[SSSD] [PATCH] BUILD: Fix linking cwrap tests with -Wl, --as-needed

Lukas Slebodnik lslebodn at redhat.com
Thu Oct 23 09:35:23 UTC 2014


ehlo,

If linker flag --as-needed is used order of libraries cannot be random
otherwise some libraries needn't be used in linking process.
The simple patch is attached.

LS
-------------- next part --------------
>From 8ff5ac3aeef7b1365064faaa55b88fc7a64e5384 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Thu, 23 Oct 2014 10:36:58 +0200
Subject: [PATCH 2/3] BUILD: Fix linking cwrap tests with -Wl,--as-needed

  CCLD     responder_common-tests
.libs/libsss_util.so: undefined reference to `sss_base64_encode'
.libs/libsss_util.so: undefined reference to `s3crypt_gen_salt'
.libs/libsss_util.so: undefined reference to `sss_base64_decode'
.libs/libsss_util.so: undefined reference to `s3crypt_sha512'
collect2: error: ld returned 1 exit status
---
 src/tests/cwrap/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tests/cwrap/Makefile.am b/src/tests/cwrap/Makefile.am
index 02be67387110c0a440b647c35bba0c10e89e699d..d98bb337954b45a246af7b625563601861fd9243 100644
--- a/src/tests/cwrap/Makefile.am
+++ b/src/tests/cwrap/Makefile.am
@@ -154,9 +154,9 @@ responder_common_tests_LDADD = \
     $(CMOCKA_LIBS) \
     $(UNICODE_LIBS) \
     $(SSSD_LIBS) \
-    $(abs_top_builddir)/libsss_debug.la \
-    $(abs_top_builddir)/libsss_crypt.la \
     $(abs_top_builddir)/libsss_util.la \
+    $(abs_top_builddir)/libsss_debug.la \
+    $(abs_top_builddir)/libsss_crypt.la \
     $(abs_top_builddir)/libsss_test_common.la \
     $(NULL)
 
-- 
2.1.0



More information about the sssd-devel mailing list