summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/cflags.SH
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-12-03 03:02:54 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-12-03 03:02:54 +0000
commitba0a2090f574df90404f8a0bbe689389ce0ebcab (patch)
tree53f8d0ad53e5fc0f05d68a0073273080ef5bd392 /gnu/usr.bin/perl/cflags.SH
parent0121b80e4f69c2ad9631e8d20b5c91f3b2a40434 (diff)
Resolve conflicts for perl 5.8.2, remove old files, and add OpenBSD-specific scaffolding
Diffstat (limited to 'gnu/usr.bin/perl/cflags.SH')
-rw-r--r--gnu/usr.bin/perl/cflags.SH31
1 files changed, 28 insertions, 3 deletions
diff --git a/gnu/usr.bin/perl/cflags.SH b/gnu/usr.bin/perl/cflags.SH
index 3ee7c5f0c64..634aba5de48 100644
--- a/gnu/usr.bin/perl/cflags.SH
+++ b/gnu/usr.bin/perl/cflags.SH
@@ -123,18 +123,43 @@ for file do
*) ;;
esac
-# Add -Wall for the core and core modules iff gcc and not already -Wall
+# Add -Wall for the core modules iff gcc and not already -Wall
warn=''
case "$gccversion" in
'') ;;
*) case "$ccflags" in
*-Wall*) ;;
-# Can't add -ansi here because it will fail e.g. in Solaris.
+ *) warn="$warn -Wall" ;;
+ esac
+ case "$gccansipedantic" in
+ define)
+ case "$gccversion" in
+ [12]*) ;; # gcc versions 1 (gasp!) and 2 are not good for this.
+ *) case "$osname" in
+ # Add -ansi -pedantic only for known platforms.
+ aix|dec_osf|freebsd|hpux|irix|linux)
+ ansipedantic="-ansi -pedantic" ;;
+ solaris)
+# Can't add -ansi for Solaris.
# Off_t/off_t is a struct in Solaris with largefiles, and with -ansi
# that struct cannot be compared with a flat integer, such as a STRLEN.
# The -ansi will also cause a lot of noise in Solaris because of:
# /usr/include/sys/resource.h:148: warning: `struct rlimit64' declared inside parameter list
- *) warn='-Wall' ;;
+ ansipedantic="-pedantic" ;;
+ esac
+ for i in $ansipedantic
+ do
+ case "$ccflags" in
+ *$i*) ;;
+ *) warn="$warn $i" ;;
+ esac
+ done
+ case "$warn$ccflags" in
+ *-pedantic*) warn="$warn -DPERL_GCC_PEDANTIC" ;;
+ esac
+ ;;
+ esac
+ ;;
esac
;;
esac