summaryrefslogtreecommitdiff
path: root/scripts/scan-tools.sh
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2014-08-05 10:10:21 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2014-08-05 10:10:25 +0200
commitff1d511b58f833bbfbc846c87affe90180c83fe0 (patch)
tree71ddfc90243ee962b37a3986843fc30a70029215 /scripts/scan-tools.sh
parentee77b8107a16aedfa24275d705fe6d1f4fa43c8d (diff)
clang does not know -static-libgcc on Darwin
Diffstat (limited to 'scripts/scan-tools.sh')
-rw-r--r--scripts/scan-tools.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh
index 988c9cceb..d2ed0e2f2 100644
--- a/scripts/scan-tools.sh
+++ b/scripts/scan-tools.sh
@@ -5,6 +5,7 @@ shopt -s extglob
topdir=$(pwd)
opath=$PATH
out=0
+clang=0
if [[ $NO_ERROR != @(0|1) ]]; then
echo Please do not invoke this script directly!
@@ -60,6 +61,7 @@ OpenBSD)
fi
;;
Darwin*)
+ clang=1
;;
*)
# unsupported
@@ -77,12 +79,16 @@ else
makecmd=$(which gmake 2>/dev/null )
fi
+if [ $clang -ne 1 ];then
+HCFLAGS=-static-libgcc
+fi
+
cat >Makefile <<'EOF'
include ${ADK_TOPDIR}/prereq.mk
all: run-test
test: test.c
- ${HOST_CC} -static-libgcc -o $@ $^ ${LDADD}
+ ${HOST_CC} $(HCFLAGS) -o $@ $^ ${LDADD}
run-test: test
./test