chiark / gitweb /
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 2699e594c37c2f66cd39bf694e48e03463018273..abe21506df6e18bea37f8ba1e9e10593ed5a8fee 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 ac56bc717612bdffa5d8a513321acf6905225dfa..9a9a7892355442b040c3cdab23a43795aaf52ab0 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