summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--configure.ac7
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