summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <Jarkko.Hietaniemi@cc.hut.fi>1997-01-27 14:33:01 +0200
committerChip Salzenberg <chip@atlantic.net>1997-01-29 18:11:00 +1200
commit8a019ce79d3f6edbd72a4f740238e43eaea4945e (patch)
tree11c817000ab55c0020cf062c3540632e45f331f7
parente3c19b7bc9a0745aef2775aa2cf9897de45593c4 (diff)
downloadperl-8a019ce79d3f6edbd72a4f740238e43eaea4945e.tar.gz
New dec_osf hints
private-msgid: <199701271233.OAA21548@alpha.hut.fi>
-rw-r--r--hints/dec_osf.sh106
1 files changed, 72 insertions, 34 deletions
diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh
index 47be434f6c..efe2c8a65b 100644
--- a/hints/dec_osf.sh
+++ b/hints/dec_osf.sh
@@ -10,41 +10,96 @@
#
#optimize=-g2
#
-# and (re)run Configure. Note: Configure will automatically
+# If you want both to optimise and debug with the DEC cc
+# you must have -g3, e.g. "-O4 -g3", and (re)run Configure.
+#
+# Note 1: gcc can always have both -g and optimisation on.
+#
+# Note 2: debugging optimised code, no matter what compiler
+# one is using, can be surprising and confusing because of
+# the optimisation tricks like code motion, code removal,
+# loop unrolling, and inlining. The source code and the
+# executable code simply do not agree any more while in
+# mid-execution, the optimiser only cares about the results.
+#
+# Note: Configure will automatically
# add the often quoted -DDEBUGGING for you)
#
case "$optimize" in
'') case "$cc" in
- *gcc*) ;;
- *) optimize='-O2 -Olimit 3200' ;;
+ *gcc*)
+ optimize='-O3'
+ ;;
+ *)
+ # compile something small: taint.c is fine for this.
+ # the main point is the '-v' flag of 'cc'.
+ case "`cc -v -I. -c taint.c -o /tmp/taint$$.o 2>&1`" in
+ */gemc_cc*)
+ # we have the new DEC GEM CC
+ optimize='-O4'
+ ;;
+ *)
+ # we have the old MIPS CC
+ optimize='-O2 -Olimit 3200'
+ ;;
+ esac
+ # cleanup
+ rm -f /tmp/taint$$.o
esac
;;
esac
-# both compilers are ANSI
+# all compilers are ANSI
ccflags="$ccflags -DSTANDARD_C"
# dlopen() is in libc
libswanted="`echo $libswanted | sed -e 's/ dl / /'`"
-# Check if it's a CMW version of OSF1
-# '-s' strips shared libraries, not useful for debugging
-if test `uname -s` = "MLS+"; then
- case "$optimize" in
- *-g*) lddlflags='-shared -expect_unresolved "*"' ;;
- *) lddlflags='-shared -expect_unresolved "*" -s' ;;
- esac
-else
- case "$optimize" in
- *-g*) lddlflags='-shared -expect_unresolved "*" -hidden' ;;
- *) lddlflags='-shared -expect_unresolved "*" -s -hidden' ;;
- esac
-fi
+# PW contains nothing useful for perl
+libswanted="`echo $libswanted | sed -e 's/ PW / /'`"
+
+# bsd contains nothing used by perl that is not already in libc
+libswanted="`echo $libswanted | sed -e 's/ bsd / /'`"
+
+# c need not be separately listed
+libswanted="`echo $libswanted | sed -e 's/ c / /'`"
+
+# dbm is already in libc (as is ndbm)
+libswanted="`echo $libswanted | sed -e 's/ dbm / /'`"
+
+# the basic lddlflags used always
+lddlflags='-shared -expect_unresolved "*"'
+
+# Check if it's a CMW version of OSF1,
+# if so, do not hide the symbols.
+test `uname -s` = "MLS+" || lddlflags="$lddlflags -hidden"
+
+# If debugging (-g) do not strip the objects, otherwise, strip.
+case "$optimize" in
+ *-g*) ;; # left intentionally blank
+ *) lddlflags="$lddlflags -s"
+esac
#
# History:
#
+# perl5.003_23:
+#
+# 26-Jan-1997 Jarkko Hietaniemi <jhi@iki.fi>
+#
+# * Notes on how to do both optimisation and debugging.
+#
+#
+# 25-Jan-1997 Jarkko Hietaniemi <jhi@iki.fi>
+#
+# * Remove unneeded libraries from $libswanted: PW, bsd, c, dbm
+#
+# * Restructure the $lddlflags build.
+#
+# * $optimize based on which compiler we have.
+#
+#
# perl5.003_22:
#
# 23-Jan-1997 Achim Bohnet <ach@rosat.mpe-garching.mpg.de>
@@ -77,20 +132,3 @@ fi
# * Set -Olimit to 3200 because perl_yylex.c got too big
# for the optimizer.
#
-
-#---------------------------------------------------------------------
-
-#
-# Where configure gets it wrong:
-#
-# - FUNCTIONS PROTOTYPES: Because the following search
-#
-# % grep _NO_PROTO /usr/include/sys/signal.h
-# #ifndef _NO_PROTO
-# #else /* _NO_PROTO */
-# #endif /* _NO_PROTO */
-# %
-#
-# is successful and because _NO_PROTO is not included already
-# in the ccflags, Configure adds -D_NO_PROTO to ccflags. :-(
-#