From: Lucas De Marchi Date: Mon, 19 Mar 2012 16:20:43 +0000 (-0300) Subject: build-sys: separate ldflags from cflags X-Git-Tag: v183~480 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=9e7adc3ae1133fa08a468768a490812299fad030;hp=eb2e280f9c59b66965c9316eadc4c113a13ca744 build-sys: separate ldflags from cflags --- diff --git a/Makefile.am b/Makefile.am index 2699e594c..abe21506d 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 ac56bc717..9a9a78923 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