summaryrefslogtreecommitdiff
path: root/Cross
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2021-07-18 08:52:10 +0000
committerNicholas Clark <nick@ccl4.org>2021-10-13 08:09:15 +0200
commit0c7be120244c1a6aae9b1ae30124265bcb8184da (patch)
tree5ddb9a542b03a183dfebc8933d87a6c223a191fa /Cross
parent1a4dad1b219ee8d6ae6487ddf4e985cdd41279d8 (diff)
downloadperl-0c7be120244c1a6aae9b1ae30124265bcb8184da.tar.gz
Teach Configure and cflags.SH about C99
Probe to see whether we need -std=gnu99 or -std=c99 to get C99 code to compile. In cflags.SH, remove code that added gcc warning flags that were compatible with C89 but are not compatible with C99.
Diffstat (limited to 'Cross')
-rw-r--r--Cross/cflags-cross-arm16
1 files changed, 2 insertions, 14 deletions
diff --git a/Cross/cflags-cross-arm b/Cross/cflags-cross-arm
index 93d4f1eaee..4d7f05a4f6 100644
--- a/Cross/cflags-cross-arm
+++ b/Cross/cflags-cross-arm
@@ -1,9 +1,9 @@
#!/bin/sh
# Extra warnings, used e.g. for gcc.
-warn="-Wall -ansi -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat"
+warn="-Wall -W -Wextra -Wendif-labels -Wc++-compat"
# Extra standardness.
-stdflags=" -std=c89"
+stdflags=" -std=c99"
# Extra extra.
extra=""
@@ -113,18 +113,6 @@ for file do
case "$cc" in
*g++*)
- # Extra paranoia in case people have bad canned ccflags:
- # bad in the sense that the flags are accepted by g++,
- # but then whined about.
- for f in -Wdeclaration-after-statement -std=c89
- do
- ccflags=`echo $ccflags|sed 's/$f/ /'`
- done
- ;;
-esac
-
-case "$cc" in
-*g++*)
# Without -Wno-unused-variable g++ 4.x compiles are rather unwatchable
# because of all the warnings about Perl___notused, and g++ doesn't do
# __attribute__((unused)) (and even if at some stage it may, people do