summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRoy Storey <kiwiroy@users.noreply.github.com>2018-09-24 11:51:55 (GMT)
committerAlexey Neyman <stilor@att.net>2019-02-13 21:23:40 (GMT)
commit2306701d2c4f9ad2dd493e4cff4188b8faa23b83 (patch)
tree2505c20d89715125b0f64af24167aaadbd3b1110 /scripts
parent8bdb0ccd0407b69ed14b75f6e32ecf79d7e113f0 (diff)
clang check before add to CT_CFLAGS_FOR_BUILD/HOST
Diffstat (limited to 'scripts')
-rw-r--r--scripts/crosstool-NG.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/crosstool-NG.sh b/scripts/crosstool-NG.sh
index 9804a6c..b15a488 100644
--- a/scripts/crosstool-NG.sh
+++ b/scripts/crosstool-NG.sh
@@ -523,6 +523,9 @@ if [ -z "${CT_RESTART}" ]; then
CT_LDFLAGS_FOR_BUILD="-L${CT_BUILDTOOLS_PREFIX_DIR}/lib"
CT_LDFLAGS_FOR_BUILD+=" ${CT_EXTRA_LDFLAGS_FOR_BUILD}"
+ if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then
+ CT_CFLAGS_FOR_BUILD+=" -Qunused-arguments"
+ fi
case "${CT_BUILD}" in
*darwin*)
# Two issues while building on MacOS. Really, we should be checking for
@@ -550,6 +553,9 @@ if [ -z "${CT_RESTART}" ]; then
CT_CFLAGS_FOR_HOST+=" ${CT_EXTRA_CFLAGS_FOR_HOST}"
CT_LDFLAGS_FOR_HOST="-L${CT_HOST_COMPLIBS_DIR}/lib"
CT_LDFLAGS_FOR_HOST+=" ${CT_EXTRA_LDFLAGS_FOR_HOST}"
+ if ${CT_HOST}-gcc --version 2>&1 | grep clang; then
+ CT_CFLAGS_FOR_HOST+=" -Qunused-arguments"
+ fi
case "${CT_HOST}" in
*darwin*)
# Same as above, for host