From 0716a903ccd5bbb42d09dc322cdd15403aee782d Mon Sep 17 00:00:00 2001 From: zlowram Date: Sun, 11 Mar 2018 23:35:40 +0100 Subject: [PATCH] Honor CFLAGS and LDFLAGS in static build script (#9660) The CFLAGS and LDFLAGS were being overwritten and didn't allow modification of such variables for adding other compiling and linking options (e.g. compile with address sanitizer + coverage) --- sys/static.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/static.sh b/sys/static.sh index 4affc15d36..aa169dd658 100755 --- a/sys/static.sh +++ b/sys/static.sh @@ -1,7 +1,7 @@ #!/bin/sh if [ "$(uname)" = Linux ]; then - LDFLAGS="-lpthread -ldl -lutil -lm" + LDFLAGS="${LDFLAGS} -lpthread -ldl -lutil -lm" fi MAKE=make gmake --help >/dev/null 2>&1 @@ -33,7 +33,7 @@ if [ 1 = "${DOCFG}" ]; then if [ -f config-user.mk ]; then ${MAKE} mrproper > /dev/null 2>&1 fi - export CFLAGS="-fPIC" + export CFLAGS="${CFLAGS} -fPIC" cp -f plugins.static.cfg plugins.cfg #-D__ANDROID__=1" ./configure-plugins || exit 1