NetworkManager/tools
Thomas Haller c92a3ca5c2
build: fix generating "NetworkManager.ver" with LTO
We use a linker version script "NetworkManager.ver", to hide
symbols from NetworkManager that are not used. That is important
due to our habit of using internal helper libraries that we link
statically everywhere, without handpicking the symbols we actually
need. We want the tooling to get rid of unnecessary symbols.

However, NetworkManager loads shared libraries for settings and device
plugins. These libraries require symbols from the NetworkManager binary,
but which one depends on build options. Hence, we also generate
"NetworkManager.ver" by the "tools/create-exports-NetworkManager.sh"
script.

For that the script uses "nm" to find symbols that are undefined in the
plugin libraries but defined in NetworkManager. With autotools the
script looked at "./src/.libs/libNetworkManager.a" to find the present
symbols. Note that for meson that already didn't work, and we build
instead an intermediate NetworkManager binary first (with all symbols
exposed). With LTO, "nm" doesn't find all symbols in
"./src/.libs/libNetworkManager.a", and consequently they are not
exported and dropped/hidden.

This also causes unit tests to fail with LTO, because our test script
"tools/check-exports.sh" catches such bugs.

Fix that by also with autotools generate a complete "NetworkManager-all-sym"
binary that is used to generate "NetworkManager.ver", before rebuilding
"NetworkManager" again.
2020-08-17 15:18:05 +02:00
..
check-config-options.sh core: add checks on connection default properties 2018-12-01 15:16:48 +01:00
check-docs.sh tools: fix out-of-tree build test "tools/check-docs.sh" for duplicate generated sources 2019-04-23 11:45:06 +02:00
check-exports.sh tools/check-exports.sh: use ${NM} when available 2015-09-24 16:28:15 +02:00
check-settings-docs.sh meson: add check on settings docs 2018-12-12 14:38:18 +01:00
create-exports-NetworkManager.sh build: fix generating "NetworkManager.ver" with LTO 2020-08-17 15:18:05 +02:00
debug-helper.py all: reformat python files with python black 2020-06-15 16:40:38 +02:00
enums-to-docbook.pl all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
generate-docs-nm-property-infos.pl docs: move generate-docs scripts from "libnm/" to "tools/" 2020-06-11 10:53:50 +02:00
generate-docs-nm-settings-docs-gir.py docs: fix escaping XML in "tools/generate-docs-nm-settings-docs-gir.py" 2020-06-26 13:33:41 +02:00
generate-docs-nm-settings-docs-merge.py all: reformat python files with python black 2020-06-15 16:40:38 +02:00
meson-post-install.sh docs: add more nm-settings manpages (dbus,nmcli,keyfile,ifcfg-rh) 2020-06-11 10:53:49 +02:00
run-nm-test.sh tests: fix handling of $NMTST_LIBTOOL in "tools/run-nm-test.sh" script 2020-08-17 15:18:02 +02:00
test-build.sh all: goodbye libnm-glib 2019-04-16 15:52:27 +02:00
test-networkmanager-service.py all: reformat python files with python black 2020-06-15 16:40:38 +02:00
test-sudo-wrapper.sh nmtst: add nmtst_reexec_sudo() function 2014-06-05 18:12:57 +02:00