diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-29 12:05:10 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-29 12:05:10 +0000 |
commit | 16c1da1211c8638b12e6da8a0d363a88ae4a57e5 (patch) | |
tree | ac3db4ac2561a4fcd8b2966a1e16d14ca1e66ef8 /hints/hpux.sh | |
parent | d88df687829d8e1fb1928d0da0f560eb2e46996d (diff) | |
download | perl-16c1da1211c8638b12e6da8a0d363a88ae4a57e5.tar.gz |
HP-UX needs gccversion sooner, from Merijn Brand.
p4raw-id: //depot/perl@11019
Diffstat (limited to 'hints/hpux.sh')
-rw-r--r-- | hints/hpux.sh | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/hints/hpux.sh b/hints/hpux.sh index 21ad30c024..34135035f1 100644 --- a/hints/hpux.sh +++ b/hints/hpux.sh @@ -63,18 +63,25 @@ case "$prefix" in case `$cc -v 2>&1`"" in *gcc*) ccisgcc="$define" ccflags="$cc_cppflags" + if [ "X$gccversion" = "X" ]; then + # Done too late in Configure if hinted + gccversion=`$cc --version` + fi case "`getconf KERNEL_BITS 2>/dev/null`" in *64*) - echo "main(){}">try.c - # gcc with gas will not accept +DA2.0 - case "`$cc -c -Wa,+DA2.0 try.c 2>&1`" in - *"+DA2.0"*) # gas - gnu_as=yes + case "$gccversion" in + 3*) ccflags="$ccflags -mpa-risc-2-0" ;; - *) # HPas - case "$gccversion" in - [12]*) ccflags="$ccflags -Wa,+DA2.0" ;; - esac + *) echo "main(){}">try.c + # gcc with gas will not accept +DA2.0 + case "`$cc -c -Wa,+DA2.0 try.c 2>&1`" in + *"+DA2.0"*) # gas + gnu_as=yes + ;; + *) # HPas + ccflags="$ccflags -Wa,+DA2.0" + ;; + esac ;; esac # gcc with gld will not accept +vnocompatwarnings @@ -189,8 +196,11 @@ EOM # anyway. Expect auto-detection of 64-bit enabled gcc on # HP-UX soon, including a user-friendly exit case $gcc_64native in - no) ccflags="$ccflags -mlp64" - ldflags="$ldflags -Wl,+DD64" + no) case "$gccversion" in + [12]*) ccflags="$ccflags -mlp64" + ldflags="$ldflags -Wl,+DD64" + ;; + esac ;; esac ;; |