build-sys: separate ldflags from cflags
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Mon, 19 Mar 2012 16:20:43 +0000 (13:20 -0300)
committerLennart Poettering <lennart@poettering.net>
Mon, 26 Mar 2012 19:02:29 +0000 (21:02 +0200)
Makefile.am
configure.ac

index 2699e59..abe2150 100644 (file)
@@ -107,6 +107,7 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src/systemd
 
 AM_CFLAGS = $(WARNINGFLAGS)
+AM_LDFLAGS = $(GCLDFLAGS)
 
 if TARGET_GENTOO
 AM_CPPFLAGS += \
index ac56bc7..9a9a789 100644 (file)
@@ -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