4 # How to make a DEBUGGING VERSION of perl for DECs cc compiler
6 # If you want to debug perl or want to send a
7 # stack trace for inclusion into an bug report, call
8 # Configure with the additional argument -Doptimize=-g2
9 # or uncomment this assignment to "optimize":
13 # If you want both to optimise and debug with the DEC cc
14 # you must have -g3, e.g. "-O4 -g3", and (re)run Configure.
16 # Note 1: gcc can always have both -g and optimisation on.
18 # Note 2: debugging optimised code, no matter what compiler
19 # one is using, can be surprising and confusing because of
20 # the optimisation tricks like code motion, code removal,
21 # loop unrolling, and inlining. The source code and the
22 # executable code simply do not agree any more while in
23 # mid-execution, the optimiser only cares about the results.
25 # Note: Configure will automatically
26 # add the often quoted -DDEBUGGING for you)
35 # compile something small: taint.c is fine for this.
36 # the main point is the '-v' flag of 'cc'.
37 case "`cc -v -I. -c taint.c -o /tmp/taint$$.o 2>&1`" in
39 # we have the new DEC GEM CC
43 # we have the old MIPS CC
44 optimize='-O2 -Olimit 3200'
53 # all compilers are ANSI
54 ccflags="$ccflags -DSTANDARD_C"
57 libswanted="`echo $libswanted | sed -e 's/ dl / /'`"
59 # PW contains nothing useful for perl
60 libswanted="`echo $libswanted | sed -e 's/ PW / /'`"
62 # bsd contains nothing used by perl that is not already in libc
63 libswanted="`echo $libswanted | sed -e 's/ bsd / /'`"
65 # c need not be separately listed
66 libswanted="`echo $libswanted | sed -e 's/ c / /'`"
68 # dbm is already in libc (as is ndbm)
69 libswanted="`echo $libswanted | sed -e 's/ dbm / /'`"
71 # the basic lddlflags used always
72 lddlflags='-shared -expect_unresolved "*"'
74 # Check if it's a CMW version of OSF1,
75 # if so, do not hide the symbols.
76 test `uname -s` = "MLS+" || lddlflags="$lddlflags -hidden"
78 # If debugging (-g) do not strip the objects, otherwise, strip.
80 *-g*) ;; # left intentionally blank
81 *) lddlflags="$lddlflags -s"
89 # 26-Jan-1997 Jarkko Hietaniemi <jhi@iki.fi>
91 # * Notes on how to do both optimisation and debugging.
94 # 25-Jan-1997 Jarkko Hietaniemi <jhi@iki.fi>
96 # * Remove unneeded libraries from $libswanted: PW, bsd, c, dbm
98 # * Restructure the $lddlflags build.
100 # * $optimize based on which compiler we have.
105 # 23-Jan-1997 Achim Bohnet <ach@rosat.mpe-garching.mpg.de>
107 # * Added comments 'how to create a debugging version of perl'
109 # * Fixed logic of this script to prevent stripping of shared
110 # objects by the loader (see ld man page for -s) is debugging
111 # is set via the -g switch.
114 # 21-Jan-1997 Achim Bohnet <ach@rosat.mpe-garching.mpg.de>
116 # * now 'dl' is always removed from libswanted. Not only if
117 # optimize is an empty string.
120 # 17-Jan-1997 Achim Bohnet <ach@rosat.mpe-garching.mpg.de>
122 # * Removed 'dl' from libswanted: When the FreePort binary
123 # translator for Sun binaries is installed Configure concludes
124 # that it should use libdl.x.yz.fpx.so :-(
125 # Because the dlopen, dlclose,... calls are in the
126 # C library it not necessary at all to check for the
127 # dl library. Therefore dl is removed from libswanted.
130 # 1-Jan-1997 Achim Bohnet <ach@rosat.mpe-garching.mpg.de>
132 # * Set -Olimit to 3200 because perl_yylex.c got too big