diff options
Diffstat (limited to 'gsettings')
-rwxr-xr-x | gsettings/abicheck.sh | 26 | ||||
-rw-r--r-- | gsettings/meson.build | 29 | ||||
-rw-r--r-- | gsettings/symbol.map | 10 | ||||
-rw-r--r-- | gsettings/symbols.txt | 3 |
4 files changed, 21 insertions, 47 deletions
diff --git a/gsettings/abicheck.sh b/gsettings/abicheck.sh deleted file mode 100755 index 1dca6ea..0000000 --- a/gsettings/abicheck.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -# The following checks that gsettings/libdconfsettings.so only has -# dconf_* symbols. -# -# We also make sure to ignore gcov symbols included when building with -# --coverage, which usually means the following: -# -# __gcov_error_file -# __gcov_master -# __gcov_sort_n_vals -# __gcov_var -# -# And starting with gcc-9, also this one: -# -# mangle_path - -${NM:-nm} --dynamic --defined-only $GSETTINGS_LIB > public-abi - -test "`\ - cat public-abi | \ - cut -f 3 -d ' ' | \ - grep -v ^_ | \ - grep -v ^mangle_path | \ - grep -v ^g_io_module | \ - wc -l`" -eq 0 && rm public-abi diff --git a/gsettings/meson.build b/gsettings/meson.build index a28892d..9463453 100644 --- a/gsettings/meson.build +++ b/gsettings/meson.build @@ -1,32 +1,19 @@ -# We use the libraries directly, as the dependency objects use -# link_whole; this avoids the gsettings backend module exposing -# symbols other than g_io_module_* backend_deps = [ - libdconf_common_hidden, - libdconf_gdbus_thread, + libdconf_common_dep, + libdconf_gdbus_thread_dep, ] +symbol_map = join_paths(meson.current_source_dir(), 'symbol.map') +ldflags = cc.get_supported_link_arguments('-Wl,--version-script,@0@'.format(symbol_map)) + libdconf_settings = shared_library( 'dconfsettings', sources: 'dconfsettingsbackend.c', include_directories: top_inc, - link_with: backend_deps, - dependencies: gio_dep, + dependencies: backend_deps, c_args: dconf_c_args, + link_args: ldflags, + link_depends: symbol_map, install: true, install_dir: gio_module_dir, ) - -envs = test_env + [ - 'G_TEST_SRCDIR=' + meson.current_source_dir(), - 'G_TEST_BUILDDIR=' + meson.current_build_dir(), - 'GSETTINGS_LIB=' + libdconf_settings.full_path(), -] - -unit_test = 'abicheck' - -test( - unit_test, - find_program(unit_test + '.sh'), - env: envs, -) diff --git a/gsettings/symbol.map b/gsettings/symbol.map new file mode 100644 index 0000000..ad1719c --- /dev/null +++ b/gsettings/symbol.map @@ -0,0 +1,10 @@ +{ +global: + g_io_module_load; + g_io_module_unload; + g_io_module_query; + environ; + __progname; +local: + *; +}; diff --git a/gsettings/symbols.txt b/gsettings/symbols.txt new file mode 100644 index 0000000..0ac9e5e --- /dev/null +++ b/gsettings/symbols.txt @@ -0,0 +1,3 @@ +g_io_module_load +g_io_module_query +g_io_module_unload |