summaryrefslogtreecommitdiff
path: root/scripts/build/debug/300-gdb.sh
diff options
context:
space:
mode:
authorRoy Storey <kiwiroy@users.noreply.github.com>2018-09-24 12:04:02 (GMT)
committerAlexey Neyman <stilor@att.net>2019-02-13 21:23:46 (GMT)
commit5d84835f908172cf170045395e203346890f02bd (patch)
tree3bb8d4518ef6eeb91d354b9ac83747693f7087be /scripts/build/debug/300-gdb.sh
parent2306701d2c4f9ad2dd493e4cff4188b8faa23b83 (diff)
decouple darwin/clang here as per #712
https://github.com/crosstool-ng/crosstool-ng/issues/712#issuecomment-300891861
Diffstat (limited to 'scripts/build/debug/300-gdb.sh')
-rw-r--r--scripts/build/debug/300-gdb.sh23
1 files changed, 11 insertions, 12 deletions
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
index c73e430..b605392 100644
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -104,18 +104,17 @@ do_debug_gdb_build() {
cross_LDFLAGS+=" -static"
fi
- case "${CT_HOST}" in
- *darwin*)
- # FIXME: Really, we should be testing for host compiler being clang.
- cross_CFLAGS+=" -Qunused-arguments"
- cross_CXXFLAGS+=" -Qunused-arguments"
- # clang detects the line from gettext's _ macro as format string
- # not being a string literal and produces a lot of warnings - which
- # ct-ng's logger faithfully relays to user if this happens in the
- # error() function. Suppress them.
- cross_extra_config+=("--enable-build-warnings=,-Wno-format-nonliteral,-Wno-format-security")
- ;;
- esac
+ if ${CT_HOST}-gcc --version 2>&1 | grep clang; then
+ # FIXME: Now we really are testing for host compiler being clang
+ # (also in crosstool-NG.sh), commented
+ # cross_CFLAGS+=" -Qunused-arguments"
+ cross_CXXFLAGS+=" -Qunused-arguments"
+ # clang detects the line from gettext's _ macro as format string
+ # not being a string literal and produces a lot of warnings - which
+ # ct-ng's logger faithfully relays to user if this happens in the
+ # error() function. Suppress them.
+ cross_extra_config+=("--enable-build-warnings=,-Wno-format-nonliteral,-Wno-format-security")
+ fi
# Fix up whitespace. Some older GDB releases (e.g. 6.8a) get confused if there
# are multiple consecutive spaces: sub-configure scripts replace them with a