diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2015-11-22 11:40:36 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2015-11-23 06:55:12 -0500 |
commit | 9ce5f19e953f07bac7e8d983c49fc33376200c0f (patch) | |
tree | 3946044bd3d0f380437b3d623feadd84c5ed8385 /cflags.SH | |
parent | 3baee7ccba467a3ddc1cb6bfb1a4cabd40cd7424 (diff) | |
download | perl-9ce5f19e953f07bac7e8d983c49fc33376200c0f.tar.gz |
add -Wthread-safety for clang 3.5 or later
With this change there is no need to explicitly e.g.
Configure ... -Accflags='-Wthread-safety'
since doing just -Dusethreads with recent enough clang
will automatically add the -Wthread-safety
Diffstat (limited to 'cflags.SH')
-rwxr-xr-x | cflags.SH | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -378,6 +378,29 @@ do esac done +# If usethreads and clang, add -Wthread-safety for clang 3.5 or later. +# gccversion is defined also for clang, because compat, use that for matching. +# Apple overwrites clang version with XCode version. +# Aggressively forward-proofing. +case "$usethreads" in +define) +case "$gccversion" in +*" Clang 3."[56789]*|*" Clang "[456]*|*"Apple LLVM "[6789]*) + for f in -Wthread-safety + do + case " $warn " in + *" $f "*) ;; # Skip if already there. + *) + echo "cflags.SH: Adding $f because usethreads and clang and gccversion '$gccversion'" + warn="$warn $f" + ;; + esac + done +;; +esac +;; +esac + echo "cflags.SH: cc = $cc" echo "cflags.SH: ccflags = $ccflags" echo "cflags.SH: stdflags = $stdflags" |