diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2006-01-08 13:38:34 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-01-08 22:06:18 +0000 |
commit | 4cd1238092c2f34faeea23510aeb354b69da2ae3 (patch) | |
tree | 1aafd0e228eaaca84cf65c115a47b3a0077a0083 | |
parent | 08cfef05fe69cafa7af66bcf9f6db61fc331af13 (diff) | |
download | perl-4cd1238092c2f34faeea23510aeb354b69da2ae3.tar.gz |
Integrate:
[ 26707]
Subject: [PATCH] hints/dec_osf.sh (Re: blead@26701 compilation warning from tru64 cc)
Message-ID: <43C0DD9A.9080809@gmail.com>
p4raw-link: @26707 on //depot/perl: b6c2855378a705b6278bd4e260febb2b484b9fcd
p4raw-id: //depot/maint-5.8/perl@26742
p4raw-integrated: from //depot/perl@26741 'copy in' hints/dec_osf.sh
(@25231..)
-rw-r--r-- | hints/dec_osf.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh index fbdf6245da..2a2bf616b9 100644 --- a/hints/dec_osf.sh +++ b/hints/dec_osf.sh @@ -126,17 +126,23 @@ EOF # If it is, we can use it for being nauseatingly C99 ANSI -- # but even then the lddlflags needs to stay -std1. # If it is not, we must use -std1 for both flags. + # case "`cc -c99 try.c 2>&1`" in - *"-c99: Unknown flag"*) _ccflags_strict_ansi="-std1" ;; + *"-c99: Unknown flag"*) + _ccflags_strict_ansi="-std1" + ;; *) # However, use the -c99 only if compiling for # -DPERL_MEM_LOG, where the C99 feature __func__ # is useful to have. Otherwise use the good old # -std1 so that we stay C89 strict, which the goal # of the Perl C code base (no //, no code between - # declarations, etc). + # declarations, etc). Moreover, the Tru64 cc is + # not fully C99, and most probably never will be. + # # The -DPERL_MEM_LOG can be either in ccflags # (if using an old config.sh) or in the command line # (which has been stowed away in UU/cmdline.opt). + # case "$ccflags `cat UU/cmdline.opt`" in *-DPERL_MEM_LOG*) _ccflags_strict_ansi="-c99" ;; *) _ccflags_strict_ansi="-std1" ;; @@ -144,6 +150,9 @@ EOF ;; esac _lddlflags_strict_ansi="-std1" + # -no_ansi_alias because Perl code is not that strict + # (also gcc uses by default -fno-strict-aliasing). + _ccflags_strict_ansi="$_ccflags_strict_ansi -no_ansi_alias" # Cleanup. rm -f try.c try.o ;; |