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

116 lines
3.1 KiB
Diff
Raw Normal View History

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 | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
Index: sssd-1.9.2/Makefile.am
===================================================================
--- sssd-1.9.2.orig/Makefile.am
+++ sssd-1.9.2/Makefile.am
@@ -746,8 +746,8 @@ sss_sudo_cli_SOURCES = \
src/sss_client/common.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) \
libsss_sudo.la
endif
@@ -758,6 +758,7 @@ sss_ssh_authorizedkeys_SOURCES = \
src/sss_client/ssh/sss_ssh_authorizedkeys.c
sss_ssh_authorizedkeys_CFLAGS = $(AM_CFLAGS)
sss_ssh_authorizedkeys_LDADD = \
+ $(CLIENT_LIBS) \
libsss_util.la
sss_ssh_knownhostsproxy_SOURCES = \
@@ -766,6 +767,7 @@ sss_ssh_knownhostsproxy_SOURCES = \
src/sss_client/ssh/sss_ssh_knownhostsproxy.c
sss_ssh_knownhostsproxy_CFLAGS = $(AM_CFLAGS)
sss_ssh_knownhostsproxy_LDADD = \
+ $(CLIENT_LIBS) \
libsss_util.la
endif
@@ -1152,10 +1154,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 = \
@@ -1166,11 +1169,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
@@ -1182,9 +1186,10 @@ libsss_sudo_la_SOURCES = \
src/sss_client/sudo/sss_sudo.h \
src/sss_client/sudo/sss_sudo_private.h
libsss_sudo_la_LDFLAGS = \
- $(CLIENT_LIBS) \
-Wl,--version-script,$(srcdir)/src/sss_client/sss_sudo.exports \
-version-info 2:0:1
+libsss_sudo_la_LIBADD = \
+ $(CLIENT_LIBS)
sudolib_LTLIBRARIES = libsss_sudo.la
@@ -1201,10 +1206,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 += \
@@ -1521,10 +1527,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 = \