2013-12-02 15:09:06 +01:00
|
|
|
From c9b13c7e032fde96cf07c7d298bb7fa65fad220b Mon Sep 17 00:00:00 2001
|
2012-12-17 09:38:59 +01:00
|
|
|
From: Jan Engelhardt <jengelh@inai.de>
|
2013-12-02 15:09:06 +01:00
|
|
|
Date: Fri, 1 Nov 2013 23:01:09 +0100
|
|
|
|
Subject: [PATCH] build: fix ordering of linker flags
|
2012-12-17 09:38:59 +01:00
|
|
|
|
2013-12-02 15:09:06 +01:00
|
|
|
Libraries MUST be specified in LDADD/LIBADD, not LDFLAGS, because
|
|
|
|
LDFLAGS appear earlier in the command line and library order is
|
|
|
|
significant.
|
2012-12-17 09:38:59 +01:00
|
|
|
---
|
2013-12-02 15:09:06 +01:00
|
|
|
Makefile.am | 66 ++++++++++++++++++++++++++++++------------------------------
|
|
|
|
1 file changed, 34 insertions(+), 32 deletions(-)
|
2012-12-17 09:38:59 +01:00
|
|
|
|
2013-12-02 15:09:06 +01:00
|
|
|
Index: sssd-1.11.2/Makefile.am
|
2012-12-17 09:38:59 +01:00
|
|
|
===================================================================
|
2013-12-02 15:09:06 +01:00
|
|
|
--- sssd-1.11.2.orig/Makefile.am
|
|
|
|
+++ sssd-1.11.2/Makefile.am
|
|
|
|
@@ -600,9 +600,10 @@ dist_pkgconfig_DATA += src/providers/ipa
|
|
|
|
libipa_hbac_la_SOURCES = \
|
2012-12-17 09:38:59 +01:00
|
|
|
src/providers/ipa/hbac_evaluator.c \
|
|
|
|
src/util/sss_utf8.c
|
2013-12-02 15:09:06 +01:00
|
|
|
-libipa_hbac_la_LDFLAGS = \
|
2012-12-17 09:38:59 +01:00
|
|
|
- -version-info 0:1:0 \
|
|
|
|
+libipa_hbac_la_LIBADD = \
|
|
|
|
$(UNICODE_LIBS)
|
2013-12-02 15:09:06 +01:00
|
|
|
+libipa_hbac_la_LDFLAGS = \
|
|
|
|
+ -version-info 0:1:0
|
2012-12-17 09:38:59 +01:00
|
|
|
|
|
|
|
dist_pkgconfig_DATA += src/lib/idmap/sss_idmap.pc
|
2013-12-02 15:09:06 +01:00
|
|
|
libsss_idmap_la_SOURCES = \
|
|
|
|
@@ -617,8 +618,9 @@ 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 = \
|
|
|
|
@@ -771,10 +773,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 \
|
|
|
|
@@ -788,30 +789,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 \
|
|
|
|
@@ -825,10 +823,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 \
|
|
|
|
@@ -851,7 +848,7 @@ sss_sudo_cli_SOURCES = \
|
2012-12-17 09:38:59 +01:00
|
|
|
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
|
2013-12-02 15:09:06 +01:00
|
|
|
@@ -861,8 +858,8 @@ sss_ssh_authorizedkeys_SOURCES = \
|
2012-12-17 09:38:59 +01:00
|
|
|
src/sss_client/ssh/sss_ssh_authorizedkeys.c
|
|
|
|
sss_ssh_authorizedkeys_CFLAGS = $(AM_CFLAGS)
|
|
|
|
sss_ssh_authorizedkeys_LDADD = \
|
2013-12-02 15:09:06 +01:00
|
|
|
- $(SSSD_INTERNAL_LTLIBS)
|
|
|
|
-sss_ssh_authorizedkeys_LDFLAGS = $(CLIENT_LIBS) $(TALLOC_LIBS) $(POPT_LIBS)
|
|
|
|
+ $(SSSD_INTERNAL_LTLIBS) \
|
|
|
|
+ $(CLIENT_LIBS) $(TALLOC_LIBS) $(POPT_LIBS)
|
2012-12-17 09:38:59 +01:00
|
|
|
|
|
|
|
sss_ssh_knownhostsproxy_SOURCES = \
|
|
|
|
src/sss_client/common.c \
|
2013-12-02 15:09:06 +01:00
|
|
|
@@ -870,8 +867,8 @@ sss_ssh_knownhostsproxy_SOURCES = \
|
2012-12-17 09:38:59 +01:00
|
|
|
src/sss_client/ssh/sss_ssh_knownhostsproxy.c
|
|
|
|
sss_ssh_knownhostsproxy_CFLAGS = $(AM_CFLAGS)
|
|
|
|
sss_ssh_knownhostsproxy_LDADD = \
|
2013-12-02 15:09:06 +01:00
|
|
|
- $(SSSD_INTERNAL_LTLIBS)
|
|
|
|
-sss_ssh_knownhostsproxy_LDFLAGS = $(CLIENT_LIBS) $(TALLOC_LIBS) $(POPT_LIBS)
|
|
|
|
+ $(SSSD_INTERNAL_LTLIBS) \
|
|
|
|
+ $(CLIENT_LIBS) $(TALLOC_LIBS) $(POPT_LIBS)
|
2012-12-17 09:38:59 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
#################
|
2013-12-02 15:09:06 +01:00
|
|
|
@@ -1402,7 +1399,7 @@ noinst_PROGRAMS += autofs_test_client
|
2012-12-17 09:38:59 +01:00
|
|
|
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
|
2013-12-02 15:09:06 +01:00
|
|
|
autofs_test_client_SOURCES = \
|
|
|
|
@@ -1410,7 +1407,7 @@ autofs_test_client_SOURCES = \
|
|
|
|
src/sss_client/autofs/sss_autofs.c \
|
|
|
|
src/sss_client/common.c
|
2012-12-17 09:38:59 +01:00
|
|
|
autofs_test_client_CFLAGS = $(AM_CFLAGS)
|
|
|
|
-autofs_test_client_LDFLAGS = -lpopt $(CLIENT_LIBS)
|
|
|
|
+autofs_test_client_LDADD = -lpopt $(CLIENT_LIBS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
####################
|
2013-12-02 15:09:06 +01:00
|
|
|
@@ -1432,8 +1429,9 @@ libnss_sss_la_SOURCES = \
|
|
|
|
src/sss_client/nss_mc_passwd.c \
|
2012-12-17 09:38:59 +01:00
|
|
|
src/sss_client/nss_mc_group.c \
|
|
|
|
src/sss_client/nss_mc.h
|
2013-12-02 15:09:06 +01:00
|
|
|
+libnss_sss_la_LIBADD = \
|
|
|
|
+ $(CLIENT_LIBS)
|
2012-12-17 09:38:59 +01:00
|
|
|
libnss_sss_la_LDFLAGS = \
|
|
|
|
- $(CLIENT_LIBS) \
|
|
|
|
-module \
|
|
|
|
-version-info 2:0:0 \
|
|
|
|
-Wl,--version-script,$(srcdir)/src/sss_client/sss_nss.exports
|
2013-12-02 15:09:06 +01:00
|
|
|
@@ -1446,9 +1444,10 @@ pam_sss_la_SOURCES = \
|
|
|
|
src/util/atomic_io.c \
|
2012-12-17 09:38:59 +01:00
|
|
|
src/sss_client/sss_pam_macros.h
|
|
|
|
|
2013-12-02 15:09:06 +01:00
|
|
|
-pam_sss_la_LDFLAGS = \
|
|
|
|
+pam_sss_la_LIBADD = \
|
|
|
|
$(CLIENT_LIBS) \
|
2012-12-17 09:38:59 +01:00
|
|
|
- -lpam \
|
2013-12-02 15:09:06 +01:00
|
|
|
+ -lpam
|
|
|
|
+pam_sss_la_LDFLAGS = \
|
2012-12-17 09:38:59 +01:00
|
|
|
-module \
|
|
|
|
-avoid-version \
|
|
|
|
-Wl,--version-script,$(srcdir)/src/sss_client/sss_pam.exports
|
2013-12-02 15:09:06 +01:00
|
|
|
@@ -1462,8 +1461,9 @@ libsss_sudo_la_SOURCES = \
|
2012-12-17 09:38:59 +01:00
|
|
|
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
|
2013-12-02 15:09:06 +01:00
|
|
|
@@ -1480,8 +1480,9 @@ libsss_autofs_la_SOURCES = \
|
|
|
|
src/sss_client/autofs/sss_autofs.c \
|
2012-12-17 09:38:59 +01:00
|
|
|
src/sss_client/autofs/sss_autofs_private.h
|
|
|
|
|
2013-12-02 15:09:06 +01:00
|
|
|
+libsss_autofs_la_LIBADD = \
|
|
|
|
+ $(CLIENT_LIBS)
|
2012-12-17 09:38:59 +01:00
|
|
|
libsss_autofs_la_LDFLAGS = \
|
|
|
|
- $(CLIENT_LIBS) \
|
|
|
|
-module \
|
|
|
|
-avoid-version \
|
|
|
|
-Wl,--version-script,$(srcdir)/src/sss_client/autofs/sss_autofs.exports
|
2013-12-02 15:09:06 +01:00
|
|
|
@@ -1831,9 +1832,10 @@ sssd_pac_plugin_la_SOURCES = \
|
|
|
|
sssd_pac_plugin_la_CFLAGS = \
|
2012-12-17 09:38:59 +01:00
|
|
|
$(AM_CFLAGS) \
|
|
|
|
$(KRB5_CFLAGS)
|
2013-12-02 15:09:06 +01:00
|
|
|
-sssd_pac_plugin_la_LDFLAGS = \
|
|
|
|
+sssd_pac_plugin_la_LIBADD = \
|
|
|
|
$(CLIENT_LIBS) \
|
2012-12-17 09:38:59 +01:00
|
|
|
- -lkrb5 \
|
2013-12-02 15:09:06 +01:00
|
|
|
+ -lkrb5
|
|
|
|
+sssd_pac_plugin_la_LDFLAGS = \
|
2012-12-17 09:38:59 +01:00
|
|
|
-avoid-version \
|
|
|
|
-module
|
|
|
|
|