xfree86: build a shared lib identical to Xorg

Because we can use a shared lib in dlsym() for the symbol loader test,
but we can't use the executable.

v2: Drop a stray ' ' and rebase on 820a4cbe9f, by anholt

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Peter Hutterer 2017-05-08 10:24:34 +10:00 committed by Eric Anholt
parent 49c7425574
commit 7a19a3e093
3 changed files with 31 additions and 16 deletions

View File

@ -28,7 +28,7 @@ shared_module(
# Test that we don't have any unresolved symbols from our module to Xorg. # Test that we don't have any unresolved symbols from our module to Xorg.
xorg_build_root = join_paths(meson.build_root(), 'hw', 'xfree86') xorg_build_root = join_paths(meson.build_root(), 'hw', 'xfree86')
symbol_test_args = [] symbol_test_args = []
symbol_test_args += join_paths(xorg_build_root, 'Xorg') symbol_test_args += join_paths(xorg_build_root, 'libxorgserver.so')
symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libfb.so') symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libfb.so')
symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libshadow.so') symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libshadow.so')
if build_glamor if build_glamor

View File

@ -35,8 +35,7 @@ int main (int argc, char**argv)
if (argc < 2) { if (argc < 2) {
fprintf(stderr, fprintf(stderr,
"Must pass path of Xorg executable and any " "Must pass path any modules to be loaded.\n");
"modules to be loaded.\n");
exit(1); exit(1);
} }

View File

@ -92,25 +92,41 @@ if build_dri2
xorg_link += xorg_dri2 xorg_link += xorg_dri2
endif endif
xorg_deps = [
pixman_dep,
m_dep,
dl_dep,
pciaccess_dep,
sha1_dep,
dependency('xau'),
xdmcp_dep,
xfont2_dep,
xshmfence_dep,
config_dep,
libdrm_dep,
]
executable( executable(
'Xorg', 'Xorg',
srcs_xorg, srcs_xorg,
include_directories: [inc, xorg_inc], include_directories: [inc, xorg_inc],
link_whole: xorg_link, link_whole: xorg_link,
dependencies: [ dependencies: xorg_deps,
pixman_dep,
m_dep,
dl_dep,
pciaccess_dep,
sha1_dep,
dependency('xau'),
xdmcp_dep,
xfont2_dep,
xshmfence_dep,
config_dep,
libdrm_dep,
],
link_args: '-Wl,--export-dynamic', link_args: '-Wl,--export-dynamic',
c_args: xorg_c_args, c_args: xorg_c_args,
install: true, install: true,
) )
# For symbol presence testing only
xorgserver_lib = shared_library(
'xorgserver',
srcs_xorg,
include_directories: [inc, xorg_inc],
link_whole: xorg_link,
dependencies: xorg_deps,
link_args: '-Wl,--export-dynamic',
c_args: xorg_c_args,
install: false,
)
xorgserver_dep = declare_dependency(link_with: xorgserver_lib)