mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +00:00
build: don't statically link static libraries with other static libraries (1)
When we link static libraries together, there must be no duplicate symbols. Since we have a lot of static/intermediate libraries, getting this right is complicated and sometimes leads to ugly solutions. As a new rule: don't let static libraries link with other static libraries. Only binaries and libnm/libnm.la should explicitly link with all the static libraries that they require. There are exceptions: "src/libNetworkManager.la" and "libnm/liblibnm.la". These are static, internal libraries, but they are basically *everything* that ends up in "src/NetworkManager" and "libnm/libnm.la", respecitively. Hence, these static libraries also link against other static libraries. Another exception to this rule is "src/libNetworkManagerTest.la", for similar reasons.
This commit is contained in:
parent
d8eb9e7515
commit
1a24f3ae8d
|
@ -283,10 +283,6 @@ else
|
||||||
shared_libnacd_la_SOURCES += shared/n-acd/src/n-acd-bpf-fallback.c
|
shared_libnacd_la_SOURCES += shared/n-acd/src/n-acd-bpf-fallback.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
shared_libnacd_la_LIBADD = \
|
|
||||||
shared/libcrbtree.la \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
noinst_LTLIBRARIES += shared/nm-std-aux/libnm-std-aux.la
|
noinst_LTLIBRARIES += shared/nm-std-aux/libnm-std-aux.la
|
||||||
|
@ -2148,6 +2144,7 @@ src_libNetworkManager_la_LIBADD = \
|
||||||
src/libnm-systemd-core.la \
|
src/libnm-systemd-core.la \
|
||||||
shared/systemd/libnm-systemd-shared.la \
|
shared/systemd/libnm-systemd-shared.la \
|
||||||
shared/libnacd.la \
|
shared/libnacd.la \
|
||||||
|
shared/libcrbtree.la \
|
||||||
$(GLIB_LIBS) \
|
$(GLIB_LIBS) \
|
||||||
$(LIBUDEV_LIBS) \
|
$(LIBUDEV_LIBS) \
|
||||||
$(SYSTEMD_LOGIN_LIBS) \
|
$(SYSTEMD_LOGIN_LIBS) \
|
||||||
|
|
Loading…
Reference in a new issue