;;
esac
;;
- *) case "$opt" in
- -W)
- # -Wextra is the modern form of -W, so add
- # -W only if -Wextra is not there already.
- case " $warn " in
- *-Wextra*) ;;
- *)
- echo "cflags.SH: Adding $opt."
- warn="$warn $opt"
- ;;
- esac
- ;;
- -Werror=declaration-after-statement)
- # -pedantic* (with -std=c89) covers -Werror=d-a-s.
- case "$stdflags$warn" in
- *-std=c89*-pedantic*|*-pedantic*-std=c89*) ;;
- *)
- echo "cflags.SH: Adding $opt."
- warn="$warn $opt"
- ;;
- esac
- ;;
+ -W)
+ # -Wextra is the modern form of -W, so add
+ # -W only if -Wextra is not there already.
+ case " $warn " in
+ *-Wextra*) ;;
+ *)
+ echo "cflags.SH: Adding $opt."
+ warn="$warn $opt"
+ ;;
+ esac
+ ;;
+ -Werror=declaration-after-statement)
+ # -pedantic* (with -std=c89) covers -Werror=d-a-s.
+ case "$stdflags$warn" in
+ *-std=c89*-pedantic*|*-pedantic*-std=c89*) ;;
*)
echo "cflags.SH: Adding $opt."
warn="$warn $opt"
;;
esac
+ ;;
+ *)
+ echo "cflags.SH: Adding $opt."
+ warn="$warn $opt"
+ ;;
esac
fi
;;
esac
done
-# If usethreads and clang, add -Wthread-safety for clang 3.5 or later.
+# If usethreads and clang, add -Wthread-safety for clang 3.6 or later.
# gccversion is defined also for clang, because compat, use that for matching.
-# Apple overwrites clang version with XCode version.
-# Aggressively forward-proofing.
+# Apple overwrites clang version with XCode version, see hints/darwin.sh
+# for the gory details. Aggressively forward-proofing.
case "$usethreads" in
define)
case "$gccversion" in
-*" Clang 3."[56789]*|*" Clang "[456]*|*"Apple LLVM "[6789]*)
+*" Clang 3."[56789]*|*" Clang "[456]*|*"Apple LLVM 6.1"*|*"Apple LLVM "[789]*)
for f in -Wthread-safety
do
case " $warn " in
# allow variables like toke_cflags to be evaluated
- if echo $file | grep -v / >/dev/null
- then
- eval 'eval ${'"${file}_cflags"'-""}'
- fi
+ case "$file" in
+ */*) ;;
+ *) eval 'eval ${'"${file}_cflags"'-""}' ;;
+ esac
# or customize here