summaryrefslogtreecommitdiff
path: root/cflags.SH
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-08-02 03:04:42 +0300
committerSteve Peters <steve@fisharerojo.org>2006-08-02 03:11:51 +0000
commitb1e55cab83fc5b3a567d95fba8bca0592334b7a5 (patch)
tree7c22ca8f3f21e359c5ee8192f562cefb4f3dd3c1 /cflags.SH
parent8ea1447ce3e5b5d0a2695220018b2f9fdaf8f2e1 (diff)
downloadperl-b1e55cab83fc5b3a567d95fba8bca0592334b7a5.tar.gz
g++ heavy shoveling
Message-ID: <44CFC1EA.2050702@iki.fi> p4raw-id: //depot/perl@28645
Diffstat (limited to 'cflags.SH')
-rwxr-xr-xcflags.SH20
1 files changed, 18 insertions, 2 deletions
diff --git a/cflags.SH b/cflags.SH
index 6c7c4c9549..c32d5f8cc9 100755
--- a/cflags.SH
+++ b/cflags.SH
@@ -88,6 +88,20 @@ Intel*) ;; # Haven't we been through this already?
;;
esac
+# If we have g++, we cannot have the -Wdeclaration-after-statement.
+# Some g++s accept it but then whine about it with every file.
+case "$cc" in
+*g++*) warn="`echo $warn|sed 's/-Wdeclaration-after-statement/ /'`" ;;
+esac
+
+extra=''
+
+# C and C++ have different rules for const strings;
+# without the -fno-const-strings g++ cannot handle our habit
+# of mixing char literals and char pointers.
+case "$cc" in
+*g++*) extra="$extra -fno-const-strings" ;;
+esac
stdflags=''
@@ -104,6 +118,8 @@ $startsh
warn="$warn"
# Extra standardness.
stdflags="$stdflags"
+# Extra extra.
+extra="$extra"
!GROK!THIS!
@@ -217,8 +233,8 @@ if test -f .patch; then
fi
: Can we perhaps use $ansi2knr here
- echo "$cc -c -DPERL_CORE $ccflags $stdflags $optimize $warn"
- eval "$also "'"$cc -DPERL_CORE -c $ccflags $stdflags $optimize $warn"'
+ echo "$cc -c -DPERL_CORE $ccflags $stdflags $optimize $warn $extra"
+ eval "$also "'"$cc -DPERL_CORE -c $ccflags $stdflags $optimize $warn $extra"'
. $TOP/config.sh