tdecacqu / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone
Blob Blame History Raw
From ae7b225ce71462681825308c046a342a3b45d77e Mon Sep 17 00:00:00 2001
From: Evangelos Foutras <evangelos@foutrelis.com>
Date: Sat, 20 Apr 2013 00:17:08 +0300
Subject: [PATCH] build-sys: prevent library underlinking

Underlinking can cause subtle bugs like the recent issue with
libnss_myhostname (which was fixed in commit 1e335af7).
(cherry picked from commit 9d2d0fe1e3f28a639c26b62391f79cfd1450d91b)
---
 configure.ac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index 5820b30..79a6720 100644
--- a/configure.ac
+++ b/configure.ac
@@ -144,6 +144,7 @@ AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
 
 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
         -Wl,--as-needed \
+        -Wl,--no-undefined \
         -Wl,--gc-sections \
         -Wl,-z,relro \
         -Wl,-z,now])