diff options
author | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2012-03-19 13:20:43 -0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-03-26 21:02:29 +0200 |
commit | 9e7adc3ae1133fa08a468768a490812299fad030 (patch) | |
tree | 75f50d903c2c5177c6b66bcd45e16a4c9ab2e8a6 | |
parent | eb2e280f9c59b66965c9316eadc4c113a13ca744 (diff) |
build-sys: separate ldflags from cflags
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | configure.ac | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 2699e594c3..abe21506df 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 ac56bc7176..9a9a789235 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 |