[SSSD] [PATCH] Fix compilation with disabled link_all_deplibs.
Lukas Slebodnik
lslebodn at redhat.com
Tue May 21 15:17:14 UTC 2013
ehlo,
This patch changes dependencies among libsss_util and libsss_child,
libsss_crypt, libsss_debug. Library libsss_util no longer depends on
any internal library. Each program, which was linked with libsss_util,
now directly link necessary libraries
(libsss_child, libsss_crypt, libsss_debug)
https://fedorahosted.org/sssd/ticket/1928
Patch attached.
Adding Timo to CC
LS
-------------- next part --------------
>From 3e9514f5c24db8156c7e9945415eb80373b24805 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Tue, 21 May 2013 16:41:31 +0200
Subject: [PATCH] Fix compilation with disabled link_all_deplibs.
>From the Debian patch:
># Do not link against deplibs. This is not needed for shared libs
># on at least ELF systems since those already know which libs they
># need themself. This seems to break a few things and will be fixed
># in a better way in a future upstream version.
Overlinking has several issues. An obvious one is performance on startup,
a more serious is if one of the lib deps changes soname of something it links
against, and you could load two versions to the memory at the same time..
This patch changes dependencies among libsss_util and libsss_child,
libsss_crypt, libsss_debug. Library libsss_util no longer depends on
any internal library. Each program, which was linked with libsss_util,
now directly link necessary libraries
(libsss_child, libsss_crypt, libsss_debug)
https://fedorahosted.org/sssd/ticket/1928
---
Makefile.am | 162 +++++++++++++++++++++++++++++++++++++++++-------------------
1 file changed, 112 insertions(+), 50 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 94ad8c04afbb8ca5b340faf669b93bca00623aba..d69139fc9b4c955f1beaacb0d67b487512003c9f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -566,10 +566,7 @@ libsss_util_la_SOURCES = \
src/util/io.c
libsss_util_la_LIBADD = \
$(SSSD_LIBS) \
- $(UNICODE_LIBS) \
- libsss_child.la \
- libsss_crypt.la \
- libsss_debug.la
+ $(UNICODE_LIBS)
if BUILD_SUDO
libsss_util_la_SOURCES += src/db/sysdb_sudo.c
endif
@@ -622,7 +619,10 @@ sssd_LDADD = \
$(SSSD_LIBS) \
$(LIBNL_LIBS) \
$(KEYUTILS_LIBS) \
- libsss_util.la
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_child.la \
+ libsss_debug.la
sssd_nss_SOURCES = \
src/responder/nss/nsssrv.c \
@@ -635,7 +635,9 @@ sssd_nss_LDADD = \
$(TDB_LIBS) \
$(SSSD_LIBS) \
libsss_idmap.la \
- libsss_util.la
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la
sssd_pam_SOURCES = \
src/responder/pam/pam_LOCAL_domain.c \
@@ -648,7 +650,9 @@ sssd_pam_LDADD = \
$(TDB_LIBS) \
$(SSSD_LIBS) \
$(SELINUX_LIBS) \
- libsss_util.la
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la
if BUILD_SUDO
sssd_sudo_SOURCES = \
@@ -660,7 +664,9 @@ sssd_sudo_SOURCES = \
$(SSSD_RESPONDER_OBJ)
sssd_sudo_LDADD = \
$(SSSD_LIBS) \
- libsss_util.la
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la
endif
if BUILD_AUTOFS
@@ -671,7 +677,9 @@ sssd_autofs_SOURCES = \
$(SSSD_RESPONDER_OBJ)
sssd_autofs_LDADD = \
$(SSSD_LIBS) \
- libsss_util.la
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la
endif
if BUILD_SSH
@@ -682,7 +690,9 @@ sssd_ssh_SOURCES = \
$(SSSD_RESPONDER_OBJ)
sssd_ssh_LDADD = \
$(SSSD_LIBS) \
- libsss_util.la
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la
endif
sssd_pac_SOURCES = \
@@ -699,7 +709,9 @@ sssd_pac_LDADD = \
$(TDB_LIBS) \
$(SSSD_LIBS) \
libsss_idmap.la \
- libsss_util.la
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la
sssd_be_SOURCES = \
src/providers/data_provider_be.c \
@@ -712,7 +724,10 @@ sssd_be_LDADD = \
-ldl \
$(SSSD_LIBS) \
$(CARES_LIBS) \
- libsss_util.la
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_child.la \
+ libsss_debug.la
sssd_be_LDFLAGS = \
-Wl,--version-script,$(srcdir)/src/providers/sssd_be.exports \
-export-dynamic \
@@ -743,16 +758,20 @@ sss_useradd_SOURCES = \
src/tools/sss_useradd.c \
$(SSSD_TOOLS_OBJ)
sss_useradd_LDADD = \
+ $(TOOLS_LIBS) \
libsss_util.la \
- $(TOOLS_LIBS)
+ libsss_crypt.la \
+ libsss_debug.la
sss_userdel_SOURCES = \
src/tools/sss_userdel.c \
src/util/find_uid.c \
$(SSSD_LCL_TOOLS_OBJ)
sss_userdel_LDADD = \
+ $(TOOLS_LIBS) \
libsss_util.la \
- $(TOOLS_LIBS)
+ libsss_crypt.la \
+ libsss_debug.la
sss_userdel_CFLAGS = $(AM_CFLAGS)
sss_userdel_LDFLAGS = \
$(CLIENT_LIBS)
@@ -761,15 +780,19 @@ sss_groupadd_SOURCES = \
src/tools/sss_groupadd.c \
$(SSSD_TOOLS_OBJ)
sss_groupadd_LDADD = \
+ $(TOOLS_LIBS) \
libsss_util.la \
- $(TOOLS_LIBS)
+ libsss_crypt.la \
+ libsss_debug.la
sss_groupdel_SOURCES = \
src/tools/sss_groupdel.c \
$(SSSD_LCL_TOOLS_OBJ)
sss_groupdel_LDADD = \
+ $(TOOLS_LIBS) \
libsss_util.la \
- $(TOOLS_LIBS)
+ libsss_crypt.la \
+ libsss_debug.la
sss_groupdel_CFLAGS = $(AM_CFLAGS)
sss_groupdel_LDFLAGS = \
$(CLIENT_LIBS)
@@ -778,8 +801,10 @@ sss_usermod_SOURCES = \
src/tools/sss_usermod.c \
$(SSSD_LCL_TOOLS_OBJ)
sss_usermod_LDADD = \
+ $(TOOLS_LIBS) \
libsss_util.la \
- $(TOOLS_LIBS)
+ libsss_crypt.la \
+ libsss_debug.la
sss_usermod_CFLAGS = $(AM_CFLAGS)
sss_usermod_LDFLAGS = \
$(CLIENT_LIBS)
@@ -788,8 +813,10 @@ sss_groupmod_SOURCES = \
src/tools/sss_groupmod.c \
$(SSSD_LCL_TOOLS_OBJ)
sss_groupmod_LDADD = \
+ $(TOOLS_LIBS) \
libsss_util.la \
- $(TOOLS_LIBS)
+ libsss_crypt.la \
+ libsss_debug.la
sss_groupmod_CFLAGS = $(AM_CFLAGS)
sss_groupmod_LDFLAGS = \
$(CLIENT_LIBS)
@@ -798,15 +825,19 @@ sss_groupshow_SOURCES = \
src/tools/sss_groupshow.c \
$(SSSD_TOOLS_OBJ)
sss_groupshow_LDADD = \
+ $(TOOLS_LIBS) \
libsss_util.la \
- $(TOOLS_LIBS)
+ libsss_crypt.la \
+ libsss_debug.la
sss_cache_SOURCES = \
src/tools/sss_cache.c \
$(SSSD_LCL_TOOLS_OBJ)
sss_cache_LDADD = \
+ $(TOOLS_LIBS) \
libsss_util.la \
- $(TOOLS_LIBS)
+ libsss_crypt.la \
+ libsss_debug.la
sss_cache_CFLAGS = $(AM_CFLAGS)
sss_cache_LDFLAGS = \
$(CLIENT_LIBS)
@@ -815,15 +846,19 @@ sss_debuglevel_SOURCES = \
src/tools/sss_debuglevel.c \
$(SSSD_TOOLS_OBJ)
sss_debuglevel_LDADD = \
+ $(TOOLS_LIBS) \
libsss_util.la \
- $(TOOLS_LIBS)
+ libsss_crypt.la \
+ libsss_debug.la
sss_seed_SOURCES = \
src/tools/sss_seed.c \
$(SSSD_TOOLS_OBJ)
sss_seed_LDADD = \
+ $(TOOLS_LIBS) \
libsss_util.la \
- $(TOOLS_LIBS)
+ libsss_crypt.la \
+ libsss_debug.la
if BUILD_SUDO
sss_sudo_cli_SOURCES = \
@@ -842,8 +877,10 @@ sss_ssh_authorizedkeys_SOURCES = \
src/sss_client/ssh/sss_ssh_authorizedkeys.c
sss_ssh_authorizedkeys_CFLAGS = $(AM_CFLAGS)
sss_ssh_authorizedkeys_LDADD = \
- libsss_util.la
-sss_ssh_authorizedkeys_LDFLAGS = $(CLIENT_LIBS)
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la
+sss_ssh_authorizedkeys_LDFLAGS = $(CLIENT_LIBS) $(TALLOC_LIBS) $(POPT_LIBS)
sss_ssh_knownhostsproxy_SOURCES = \
src/sss_client/common.c \
@@ -851,8 +888,10 @@ sss_ssh_knownhostsproxy_SOURCES = \
src/sss_client/ssh/sss_ssh_knownhostsproxy.c
sss_ssh_knownhostsproxy_CFLAGS = $(AM_CFLAGS)
sss_ssh_knownhostsproxy_LDADD = \
- libsss_util.la
-sss_ssh_knownhostsproxy_LDFLAGS = $(CLIENT_LIBS)
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la
+sss_ssh_knownhostsproxy_LDFLAGS = $(CLIENT_LIBS) $(TALLOC_LIBS) $(POPT_LIBS)
endif
#################
@@ -886,6 +925,8 @@ sysdb_tests_LDADD = \
$(SSSD_LIBS) \
$(CHECK_LIBS) \
libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la \
libsss_test_common.la
sysdb_ssh_tests_DEPENDENCIES = \
@@ -899,6 +940,8 @@ sysdb_ssh_tests_LDADD = \
$(SSSD_LIBS) \
$(CHECK_LIBS) \
libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la \
libsss_test_common.la
strtonum_tests_SOURCES = \
@@ -932,6 +975,8 @@ krb5_utils_tests_LDADD = \
$(KRB5_LIBS) \
$(CHECK_LIBS) \
libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la \
libsss_test_common.la
@@ -968,10 +1013,11 @@ files_tests_CFLAGS = \
$(AM_CFLAGS) \
$(CHECK_CFLAGS)
files_tests_LDADD = \
- libsss_debug.la \
$(FILES_TESTS_LIBS) \
libsss_test_common.la \
- libsss_util.la
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la
SSSD_RESOLV_TESTS_OBJ = \
$(SSSD_RESOLV_OBJ)
@@ -992,7 +1038,7 @@ resolv_tests_LDADD = \
$(SSSD_LIBS) \
$(CHECK_LIBS) \
$(CARES_LIBS) \
- libsss_util.la \
+ libsss_debug.la \
libsss_test_common.la
refcount_tests_SOURCES = \
@@ -1004,6 +1050,8 @@ refcount_tests_LDADD = \
$(SSSD_LIBS) \
$(CHECK_LIBS) \
libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la \
libsss_test_common.la
fail_over_tests_SOURCES = \
@@ -1017,6 +1065,8 @@ fail_over_tests_LDADD = \
$(CHECK_LIBS) \
$(CARES_LIBS) \
libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la \
libsss_test_common.la
find_uid_tests_SOURCES = \
@@ -1045,6 +1095,8 @@ auth_tests_LDADD = \
$(SSSD_LIBS) \
$(CHECK_LIBS) \
libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la \
libsss_test_common.la
ipa_ldap_opt_tests_SOURCES = \
@@ -1087,6 +1139,9 @@ simple_access_tests_LDADD = \
$(CHECK_LIBS) \
$(PAM_LIBS) \
libsss_util.la \
+ libsss_crypt.la \
+ libsss_child.la \
+ libsss_debug.la \
libsss_test_common.la
util_tests_SOURCES = \
@@ -1098,6 +1153,8 @@ util_tests_LDADD = \
$(SSSD_LIBS) \
$(CHECK_LIBS) \
libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la \
libsss_test_common.la
debug_tests_SOURCES = \
@@ -1109,7 +1166,7 @@ debug_tests_CFLAGS = \
debug_tests_LDADD = \
$(SSSD_LIBS) \
$(CHECK_LIBS) \
- libsss_util.la
+ libsss_debug.la
crypto_tests_SOURCES = \
$(SSS_CRYPT_SOURCES) \
@@ -1133,7 +1190,6 @@ ipa_hbac_tests_CFLAGS = \
ipa_hbac_tests_LDADD = \
$(SSSD_LIBS) \
$(CHECK_LIBS) \
- libsss_util.la \
libsss_test_common.la \
libipa_hbac.la
@@ -1170,8 +1226,9 @@ pac_responder_tests_LDADD = \
$(SSSD_LIBS) \
-lm \
libsss_idmap.la \
- libsss_debug.la \
libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la \
libsss_test_common.la
responder_socket_access_tests_SOURCES = \
@@ -1184,16 +1241,17 @@ responder_socket_access_tests_CFLAGS = \
$(CHECK_CFLAGS)
responder_socket_access_tests_LDADD = \
$(CHECK_LIBS) \
- $(TALLOC_LIBS) \
+ $(SSSD_LIBS) \
libsss_test_common.la \
- libsss_util.la
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la
endif
stress_tests_SOURCES = \
src/tests/stress-tests.c
stress_tests_LDADD = \
$(SSSD_LIBS) \
- libsss_util.la \
libsss_test_common.la
krb5_child_test_SOURCES = \
@@ -1213,11 +1271,14 @@ krb5_child_test_CFLAGS = \
-DKRB5_CHILD_DIR=\"$(builddir)\" \
$(CHECK_CFLAGS)
krb5_child_test_LDADD = \
- $(SSSD_LIBS)\
+ $(SSSD_LIBS) \
$(CARES_LIBS) \
$(KRB5_LIBS) \
$(CHECK_LIBS) \
libsss_util.la \
+ libsss_crypt.la \
+ libsss_child.la \
+ libsss_debug.la \
libsss_test_common.la
if HAVE_CMOCKA
@@ -1254,8 +1315,11 @@ nss_srv_tests_LDFLAGS = \
-Wl,-wrap,sss_cmd_done
nss_srv_tests_LDADD = \
$(CMOCKA_LIBS) \
+ $(SSSD_LIBS) \
libsss_idmap.la \
- libsss_util.la
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la
test_find_uid_DEPENDENCIES = \
$(ldblib_LTLIBRARIES)
@@ -1269,11 +1333,10 @@ test_find_uid_CFLAGS = \
$(TALLOC_CFLAGS) \
$(DHASH_CFLAGS)
test_find_uid_LDADD = \
- libsss_debug.la \
$(TALLOC_LIBS) \
$(DHASH_LIBS) \
$(CMOCKA_LIBS) \
- libsss_util.la
+ libsss_debug.la
test_io_SOURCES = \
src/tests/cmocka/test_io.c \
@@ -1303,7 +1366,11 @@ dyndns_tests_LDFLAGS = \
dyndns_tests_LDADD = \
$(CARES_LIBS) \
$(CMOCKA_LIBS) \
- libsss_util.la
+ $(SSSD_LIBS) \
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_child.la \
+ libsss_debug.la
endif
noinst_PROGRAMS = pam_test_client
@@ -1497,7 +1564,6 @@ libsss_ldap_la_LIBADD = \
$(OPENLDAP_LIBS) \
$(DHASH_LIBS) \
$(KRB5_LIBS) \
- libsss_util.la \
libsss_ldap_common.la \
libsss_idmap.la
libsss_ldap_la_LDFLAGS = \
@@ -1514,7 +1580,6 @@ libsss_proxy_la_SOURCES = \
libsss_proxy_la_CFLAGS = \
$(AM_CFLAGS)
libsss_proxy_la_LIBADD = \
- libsss_util.la \
$(PAM_LIBS)
libsss_proxy_la_LDFLAGS = \
-avoid-version \
@@ -1526,8 +1591,7 @@ libsss_simple_la_SOURCES = \
libsss_simple_la_CFLAGS = \
$(AM_CFLAGS)
libsss_simple_la_LIBADD = \
- $(PAM_LIBS) \
- libsss_util.la
+ $(PAM_LIBS)
libsss_simple_la_LDFLAGS = \
-avoid-version \
-module
@@ -1543,7 +1607,6 @@ libsss_krb5_la_LIBADD = \
$(DHASH_LIBS) \
$(KEYUTILS_LIBS) \
$(KRB5_LIBS) \
- libsss_util.la \
libsss_krb5_common.la
libsss_krb5_la_LDFLAGS = \
-avoid-version \
@@ -1588,7 +1651,6 @@ libsss_ipa_la_LIBADD = \
$(DHASH_LIBS) \
$(KEYUTILS_LIBS) \
$(KRB5_LIBS) \
- libsss_util.la \
libsss_ldap_common.la \
libsss_krb5_common.la \
libipa_hbac.la \
@@ -1641,7 +1703,6 @@ libsss_ad_la_LIBADD = \
$(KEYUTILS_LIBS) \
$(KRB5_LIBS) \
$(NDR_NBT_LIBS) \
- libsss_util.la \
libsss_ldap_common.la \
libsss_krb5_common.la \
libsss_idmap.la
@@ -1703,7 +1764,9 @@ proxy_child_CFLAGS = \
proxy_child_LDADD = \
$(PAM_LIBS) \
$(SSSD_LIBS) \
- libsss_util.la
+ libsss_util.la \
+ libsss_crypt.la \
+ libsss_debug.la
memberof_la_SOURCES = \
src/ldb_modules/memberof.c \
@@ -1753,8 +1816,7 @@ pysss_la_CFLAGS = \
$(PYTHON_CFLAGS)
pysss_la_LIBADD = \
$(PYTHON_BINDINGS_LIBS) \
- $(PYTHON_LIBS) \
- libsss_util.la
+ $(PYTHON_LIBS)
pysss_la_LDFLAGS = \
-avoid-version \
-module
--
1.8.1.4
More information about the sssd-devel
mailing list