summaryrefslogtreecommitdiff
path: root/hints/hpux.sh
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2012-05-06 13:03:08 +0200
committerH.Merijn Brand <h.m.brand@xs4all.nl>2012-05-06 13:03:08 +0200
commit087ff916901abcba2dd047e2cf444a7747d895ee (patch)
tree2a6c2b6b8967e5ab2441ea93efa326f1a4e53e50 /hints/hpux.sh
parent31c32f21637b69ee05a82842c4a121907f0a8d4f (diff)
downloadperl-087ff916901abcba2dd047e2cf444a7747d895ee.tar.gz
Disable optimizer for 32bit PA-RISC builds on HP-UX
The (ANSI) C compiler fails to compile precompiled (.i) files when both -g and -O (all +O1 and above) are given. When -g is requested, -O, +O, and +Onolimit are removed from optimize flags This #fail does not occur with the newer aCC compiler B3910B, which is also used on HP-UX on Itanium. The check/modification has to be done as late as possible, as the other options, like -Duse64bitall and -DDEBUGING, will modify the variables that need to be checked after hints/hpux.sh has been dealt with.
Diffstat (limited to 'hints/hpux.sh')
-rw-r--r--hints/hpux.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/hints/hpux.sh b/hints/hpux.sh
index 313511ed95..27653de876 100644
--- a/hints/hpux.sh
+++ b/hints/hpux.sh
@@ -533,6 +533,27 @@ EOF
fi
EOCBU
+cat >config.arch <<'EOCBU'
+# This script UU/config.arch will get 'called-back' by Configure after
+# all other configurations are done just before config.h is generated
+case "$archname:$optimize" in
+ PA*:*-g*[-+]O*|*[-+]O*-g*)
+ case "$ccflags" in
+ *DD64*) ;;
+ *) case "$ccversion" in
+ # Only on PA-RISC. B3910B (aCC) is not faulty
+ # B.11.* and A.10.* are
+ [AB].1*)
+ # cc: error 1414: Can't handle preprocessed file foo.i if -g and -O specified.
+ echo "HP-UX C-ANSI-C on PA-RISC does not accept both -g and -O on preprocessed files" >&4
+ echo "when compiling in 32bit mode. The optimizer will be disabled." >&4
+ optimize=`echo "$optimize" | sed -e 's/[-+]O[0-9]*//' -e 's/+Onolimit//' -e 's/^ *//'`
+ ;;
+ esac
+ esac
+ esac
+EOCBU
+
cat >UU/uselargefiles.cbu <<'EOCBU'
# This script UU/uselargefiles.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use large files.