From 453308deaf6e045ef437d413f8791ec297fcc60d Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Sun, 4 Feb 2018 15:28:54 +0100 Subject: [PATCH] Strip binaries on non-OSX builds --- configure_build.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure_build.sh b/configure_build.sh index fb2ad3f5..95725c69 100644 --- a/configure_build.sh +++ b/configure_build.sh @@ -25,6 +25,13 @@ if [ -n "$IS_OSX" ]; then # Disable homebrew auto-update export HOMEBREW_NO_AUTO_UPDATE=1 +else + # Strip all binaries after compilation. + STRIP_FLAGS=${STRIP_FLAGS:-"-Wl,-strip-all"} + + export CFLAGS="${CFLAGS:-$STRIP_FLAGS}" + export CXXFLAGS="${CXXFLAGS:-$STRIP_FLAGS}" + export FFLAGS="${FFLAGS:-$STRIP_FLAGS}" fi # Promote BUILD_PREFIX on search path to any newly built libs