[systemd-devel] [PATCH 2/2] build-sys: separate ldflags from cflags

Lucas De Marchi lucas.demarchi at profusion.mobi
Mon Mar 19 09:20:43 PDT 2012


---
 Makefile.am  |    1 +
 configure.ac |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 8f736d0..0829f06 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -107,6 +107,7 @@ AM_CPPFLAGS = \
 	-I $(top_srcdir)/src/systemd
 
 AM_CFLAGS = $(WARNINGFLAGS)
+AM_LDFLAGS = $(GCLDFLAGS)
 
 if TARGET_GENTOO
 AM_CPPFLAGS += \
diff --git a/configure.ac b/configure.ac
index 51e9da3..53c8f0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,10 +102,13 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -fno-strict-aliasing \
         -fvisibility=hidden \
         -ffunction-sections \
-        -fdata-sections \
+        -fdata-sections])
+AC_SUBST([WARNINGFLAGS], $with_cflags)
+
+CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
         -Wl,--as-needed \
         -Wl,--gc-sections])
-AC_SUBST([WARNINGFLAGS], $with_cflags)
+AC_SUBST([GCLDFLAGS], $with_ldflags)
 
 LT_PREREQ(2.2)
 LT_INIT
-- 
1.7.9.4



More information about the systemd-devel mailing list