SHA256
1
0
forked from pool/sssd
sssd/sssd-ldflags.diff

236 lines
6.7 KiB
Diff

From: Jan Engelhardt <jengelh@inai.de>
Date: 2012-11-10 01:36:37.022064770 +0100
build: fix link failure because of wrong use of LDFLAGS
ld: src/sss_client/sss_ssh_authorizedkeys-common.o: undefined
reference to symbol 'pthread_mutexattr_setrobust@@GLIBC_2.12'
For the i'th time,
http://stackoverflow.com/questions/4241683/linker-flags-in-wrong-place
The patch fixes the location of library names, and also adds them
to two program which need them.
---
Makefile.am | 69 ++++++++++++++++++++++++++++++------------------------------
1 file changed, 35 insertions(+), 34 deletions(-)
Index: sssd-1.10.0/Makefile.am
===================================================================
--- sssd-1.10.0.orig/Makefile.am
+++ sssd-1.10.0/Makefile.am
@@ -588,7 +588,8 @@ libipa_hbac_la_SOURCES = \
src/providers/ipa/hbac_evaluator.c \
src/util/sss_utf8.c
libipa_hbac_la_LDFLAGS = \
- -version-info 0:1:0 \
+ -version-info 0:1:0
+libipa_hbac_la_LIBADD = \
$(UNICODE_LIBS)
dist_pkgconfig_DATA += src/lib/idmap/sss_idmap.pc
@@ -604,8 +605,8 @@ libsss_nss_idmap_la_SOURCES = \
src/sss_client/idmap/sss_nss_idmap.c \
src/sss_client/common.c \
src/util/strtonum.c
+libsss_nss_idmap_la_LIBADD = $(CLIENT_LIBS)
libsss_nss_idmap_la_LDFLAGS = \
- $(CLIENT_LIBS) \
-version-info 0:1:0
include_HEADERS = \
@@ -717,11 +718,11 @@ sssd_be_LDADD = \
-ldl \
$(SSSD_LIBS) \
$(CARES_LIBS) \
- $(SSSD_INTERNAL_LTLIBS)
+ $(SSSD_INTERNAL_LTLIBS) \
+ $(PAM_LIBS)
sssd_be_LDFLAGS = \
-Wl,--version-script,$(srcdir)/src/providers/sssd_be.exports \
- -export-dynamic \
- $(PAM_LIBS)
+ -export-dynamic
if BUILD_PYTHON_BINDINGS
sss_obfuscate_pythondir = $(sbindir)
@@ -757,10 +758,9 @@ sss_userdel_SOURCES = \
$(SSSD_LCL_TOOLS_OBJ)
sss_userdel_LDADD = \
$(TOOLS_LIBS) \
- $(SSSD_INTERNAL_LTLIBS)
-sss_userdel_CFLAGS = $(AM_CFLAGS)
-sss_userdel_LDFLAGS = \
+ $(SSSD_INTERNAL_LTLIBS) \
$(CLIENT_LIBS)
+sss_userdel_CFLAGS = $(AM_CFLAGS)
sss_groupadd_SOURCES = \
src/tools/sss_groupadd.c \
@@ -774,30 +774,27 @@ sss_groupdel_SOURCES = \
$(SSSD_LCL_TOOLS_OBJ)
sss_groupdel_LDADD = \
$(TOOLS_LIBS) \
- $(SSSD_INTERNAL_LTLIBS)
-sss_groupdel_CFLAGS = $(AM_CFLAGS)
-sss_groupdel_LDFLAGS = \
+ $(SSSD_INTERNAL_LTLIBS) \
$(CLIENT_LIBS)
+sss_groupdel_CFLAGS = $(AM_CFLAGS)
sss_usermod_SOURCES = \
src/tools/sss_usermod.c \
$(SSSD_LCL_TOOLS_OBJ)
sss_usermod_LDADD = \
$(TOOLS_LIBS) \
- $(SSSD_INTERNAL_LTLIBS)
-sss_usermod_CFLAGS = $(AM_CFLAGS)
-sss_usermod_LDFLAGS = \
+ $(SSSD_INTERNAL_LTLIBS) \
$(CLIENT_LIBS)
+sss_usermod_CFLAGS = $(AM_CFLAGS)
sss_groupmod_SOURCES = \
src/tools/sss_groupmod.c \
$(SSSD_LCL_TOOLS_OBJ)
sss_groupmod_LDADD = \
$(TOOLS_LIBS) \
- $(SSSD_INTERNAL_LTLIBS)
-sss_groupmod_CFLAGS = $(AM_CFLAGS)
-sss_groupmod_LDFLAGS = \
+ $(SSSD_INTERNAL_LTLIBS) \
$(CLIENT_LIBS)
+sss_groupmod_CFLAGS = $(AM_CFLAGS)
sss_groupshow_SOURCES = \
src/tools/sss_groupshow.c \
@@ -811,10 +808,9 @@ sss_cache_SOURCES = \
$(SSSD_LCL_TOOLS_OBJ)
sss_cache_LDADD = \
$(TOOLS_LIBS) \
- $(SSSD_INTERNAL_LTLIBS)
-sss_cache_CFLAGS = $(AM_CFLAGS)
-sss_cache_LDFLAGS = \
+ $(SSSD_INTERNAL_LTLIBS) \
$(CLIENT_LIBS)
+sss_cache_CFLAGS = $(AM_CFLAGS)
sss_debuglevel_SOURCES = \
src/tools/sss_debuglevel.c \
@@ -837,7 +833,7 @@ sss_sudo_cli_SOURCES = \
src/sss_client/sudo/sss_sudo_response.c \
src/sss_client/sudo_testcli/sudo_testcli.c
sss_sudo_cli_CFLAGS = $(AM_CFLAGS)
-sss_sudo_cli_LDFLAGS = $(CLIENT_LIBS)
+sss_sudo_cli_LDADD = $(CLIENT_LIBS)
endif
if BUILD_SSH
@@ -847,8 +843,8 @@ sss_ssh_authorizedkeys_SOURCES = \
src/sss_client/ssh/sss_ssh_authorizedkeys.c
sss_ssh_authorizedkeys_CFLAGS = $(AM_CFLAGS)
sss_ssh_authorizedkeys_LDADD = \
- $(SSSD_INTERNAL_LTLIBS)
-sss_ssh_authorizedkeys_LDFLAGS = $(CLIENT_LIBS) $(TALLOC_LIBS) $(POPT_LIBS)
+ $(SSSD_INTERNAL_LTLIBS) \
+ $(CLIENT_LIBS) $(TALLOC_LIBS) $(POPT_LIBS)
sss_ssh_knownhostsproxy_SOURCES = \
src/sss_client/common.c \
@@ -856,8 +852,8 @@ sss_ssh_knownhostsproxy_SOURCES = \
src/sss_client/ssh/sss_ssh_knownhostsproxy.c
sss_ssh_knownhostsproxy_CFLAGS = $(AM_CFLAGS)
sss_ssh_knownhostsproxy_LDADD = \
- $(SSSD_INTERNAL_LTLIBS)
-sss_ssh_knownhostsproxy_LDFLAGS = $(CLIENT_LIBS) $(TALLOC_LIBS) $(POPT_LIBS)
+ $(SSSD_INTERNAL_LTLIBS) \
+ $(CLIENT_LIBS) $(TALLOC_LIBS) $(POPT_LIBS)
endif
#################
@@ -1309,7 +1305,7 @@ noinst_PROGRAMS += autofs_test_client
endif
pam_test_client_SOURCES = src/sss_client/pam_test_client.c
-pam_test_client_LDFLAGS = -lpam -lpam_misc
+pam_test_client_LDADD = -lpam -lpam_misc
if BUILD_AUTOFS
autofs_test_client_SOURCES = \
@@ -1317,7 +1313,7 @@ autofs_test_client_SOURCES = \
src/sss_client/autofs/sss_autofs.c \
src/sss_client/common.c
autofs_test_client_CFLAGS = $(AM_CFLAGS)
-autofs_test_client_LDFLAGS = -lpopt $(CLIENT_LIBS)
+autofs_test_client_LDADD = -lpopt $(CLIENT_LIBS)
endif
####################
@@ -1340,10 +1336,11 @@ libnss_sss_la_SOURCES = \
src/sss_client/nss_mc_group.c \
src/sss_client/nss_mc.h
libnss_sss_la_LDFLAGS = \
- $(CLIENT_LIBS) \
-module \
-version-info 2:0:0 \
-Wl,--version-script,$(srcdir)/src/sss_client/sss_nss.exports
+libnss_sss_la_LIBADD = \
+ $(CLIENT_LIBS)
pamlib_LTLIBRARIES = pam_sss.la
pam_sss_la_SOURCES = \
@@ -1354,11 +1351,12 @@ pam_sss_la_SOURCES = \
src/sss_client/sss_pam_macros.h
pam_sss_la_LDFLAGS = \
- $(CLIENT_LIBS) \
- -lpam \
-module \
-avoid-version \
-Wl,--version-script,$(srcdir)/src/sss_client/sss_pam.exports
+pam_sss_la_LIBADD = \
+ $(CLIENT_LIBS) \
+ -lpam
if BUILD_SUDO
@@ -1369,8 +1367,9 @@ libsss_sudo_la_SOURCES = \
src/sss_client/sudo/sss_sudo.c \
src/sss_client/sudo/sss_sudo.h \
src/sss_client/sudo/sss_sudo_private.h
+libsss_sudo_la_LIBADD = \
+ $(CLIENT_LIBS)
libsss_sudo_la_LDFLAGS = \
- $(CLIENT_LIBS) \
-Wl,--version-script,$(srcdir)/src/sss_client/sss_sudo.exports \
-module \
-avoid-version
@@ -1388,10 +1387,11 @@ libsss_autofs_la_SOURCES = \
src/sss_client/autofs/sss_autofs_private.h
libsss_autofs_la_LDFLAGS = \
- $(CLIENT_LIBS) \
-module \
-avoid-version \
-Wl,--version-script,$(srcdir)/src/sss_client/autofs/sss_autofs.exports
+libsss_autofs_la_LIBADD = \
+ $(CLIENT_LIBS)
endif
dist_noinst_DATA += \
@@ -1725,10 +1725,11 @@ sssd_pac_plugin_la_CFLAGS = \
$(AM_CFLAGS) \
$(KRB5_CFLAGS)
sssd_pac_plugin_la_LDFLAGS = \
- $(CLIENT_LIBS) \
- -lkrb5 \
-avoid-version \
-module
+sssd_pac_plugin_la_LIBADD = \
+ $(CLIENT_LIBS) \
+ -lkrb5
if BUILD_PYTHON_BINDINGS
pysss_la_SOURCES = \