diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-01-26 16:39:40 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-01-26 16:39:40 +0000 |
commit | 3e8416a3d479179c18109951e5260dc3c0ae4158 (patch) | |
tree | 3e35033cf8a475ad40141902b24654ec163250f3 /cflags.SH | |
parent | d9095cec1bba87df718f5a1d0a9ab42fe217cea4 (diff) | |
download | perl-3e8416a3d479179c18109951e5260dc3c0ae4158.tar.gz |
If we have specified -Dgccansipedantic on the Configure command-line,
assume we really want it
p4raw-id: //depot/perl@30016
Diffstat (limited to 'cflags.SH')
-rwxr-xr-x | cflags.SH | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -142,16 +142,18 @@ rm -f _cflags.c _cflags$_exe case "$gccversion" in '') ;; *) - # If we have -Duse64bitint (or equivalent) in effect and the quadtype - # has become 'long long', gcc -pedantic becomes unbearable (moreso - # when combined with -Wall) because long long and LL and %lld|%Ld - # become warn-worthy. So let's drop the -pedantic in that case. - case "$quadtype:$sPRId64" in - "long long"*|*lld*|*Ld*) - ccflags="`echo $ccflags|sed 's/-pedantic/ /'`" - warn="`echo $warn|sed 's/-pedantic/ /'`" - ;; - esac + if [ "$gccansipedantic" = "" ]; then + # If we have -Duse64bitint (or equivalent) in effect and the quadtype + # has become 'long long', gcc -pedantic becomes unbearable (moreso + # when combined with -Wall) because long long and LL and %lld|%Ld + # become warn-worthy. So let's drop the -pedantic in that case. + case "$quadtype:$sPRId64" in + "long long"*|*lld*|*Ld*) + ccflags="`echo $ccflags|sed 's/-pedantic/ /'`" + warn="`echo $warn|sed 's/-pedantic/ /'`" + ;; + esac + fi # Using certain features (like the gcc statement expressions) # requires knowing whether -pedantic has been specified. case "$warn$ccflags" in |