summaryrefslogtreecommitdiff
path: root/cflags.SH
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-01-26 16:39:40 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-01-26 16:39:40 +0000
commit3e8416a3d479179c18109951e5260dc3c0ae4158 (patch)
tree3e35033cf8a475ad40141902b24654ec163250f3 /cflags.SH
parentd9095cec1bba87df718f5a1d0a9ab42fe217cea4 (diff)
downloadperl-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-xcflags.SH22
1 files changed, 12 insertions, 10 deletions
diff --git a/cflags.SH b/cflags.SH
index ece6548aff..a52c850527 100755
--- a/cflags.SH
+++ b/cflags.SH
@@ -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