From 360a2bfd5de1bc7fbdb69347f2b105fc231e63ef Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 30 Nov 2018 13:47:05 -0800 Subject: macOS: Apple's ancient linker doesn't have --as-needed or --gc-sections. --- configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 58e754ad..06d7cbab 100755 --- a/configure +++ b/configure @@ -22,7 +22,11 @@ CFLAGS="$CFLAGS -funsigned-char" [ -z "$OPTIMIZE" ] && OPTIMIZE="-Os -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables -fno-strict-aliasing" # We accept LDFLAGS, but by default don't have anything in it -[ -z "$LDOPTIMIZE" ] && LDOPTIMIZE="-Wl,--gc-sections" +if [ "$(uname)" != "Darwin" ] +then + [ -z "$LDOPTIMIZE" ] && LDOPTIMIZE="-Wl,--gc-sections" + LDASNEEDED="-Wl,--as-needed" +fi # The makefile provides defaults for these, so this only gets used if # you call scripts/make.sh and friends directly. -- cgit v1.2.3