Commit afe51420 authored by Michael Tremer's avatar Michael Tremer

linker: Do not use --gc-sections on non-GNU platforms

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent c2108435
......@@ -6,6 +6,8 @@ AM_MAKEFLAGS = --no-print-directory
SUBDIRS = . po
BINDINGS =
OS = $(shell uname -s)
if ENABLE_PERL
BINDINGS += perl
endif
......@@ -19,9 +21,16 @@ AM_CFLAGS = ${my_CFLAGS} \
-ffunction-sections \
-fdata-sections
AM_LDFLAGS = \
-Wl,--gc-sections \
-Wl,--as-needed
AM_LDFLAGS =
# leaving a space here to work around automake's conditionals
ifeq ($(OS),Darwin)
AM_LDFLAGS += -Wl,-dead_strip
else
AM_LDFLAGS += \
-Wl,--as-needed \
-Wl,--gc-sections
endif
LIBLOC_CURRENT=0
LIBLOC_REVISION=0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment