From: Jarkko Hietaniemi Date: Sun, 23 Feb 1997 14:27:19 +0000 (+0200) Subject: Digital UNIX and 3_28 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=58c0852f6968d0b4520a03e22a56226185ab78c6;p=p5sagit%2Fp5-mst-13.2.git Digital UNIX and 3_28 Please try this on 3_28 in as many Digital UNIX / DEC OSF/1 boxes you can and report the results back to me. I have already 100% positive make test results from Digital UNIX 4.0 cc static/shared, gcc static/shared Digital UNIX 4.0B cc static/shared, gcc static/shared DEC OSF/1 3.2C cc static/shared, gcc static/shared so you can test some other os / compiler combinations first. p5p-msgid: <199702231427.QAA13807@alpha.hut.fi> --- diff --git a/Configure b/Configure index 72c1a39..60ed79c 100755 --- a/Configure +++ b/Configure @@ -4718,7 +4718,7 @@ if "$useshrplib"; then freebsd) xxx="-Wl,-R$shrpdir" ;; - linux|irix*) + linux|irix*|dec_osf) xxx="-Wl,-rpath,$shrpdir" ;; *) diff --git a/MANIFEST b/MANIFEST index 7a79d90..29657cb 100644 --- a/MANIFEST +++ b/MANIFEST @@ -120,6 +120,7 @@ ext/IO/lib/IO/Socket.pm IO::Socket extension Perl module ext/NDBM_File/Makefile.PL NDBM extension makefile writer ext/NDBM_File/NDBM_File.pm NDBM extension Perl module ext/NDBM_File/NDBM_File.xs NDBM extension external subroutines +ext/NDBM_File/hints/dec_osf.pl Hint for NDBM_File for named architecture ext/NDBM_File/hints/dynixptx.pl Hint for NDBM_File for named architecture ext/NDBM_File/hints/solaris.pl Hint for NDBM_File for named architecture ext/NDBM_File/hints/svr4.pl Hint for NDBM_File for named architecture diff --git a/ext/NDBM_File/hints/dec_osf.pl b/ext/NDBM_File/hints/dec_osf.pl new file mode 100644 index 0000000..e96d907 --- /dev/null +++ b/ext/NDBM_File/hints/dec_osf.pl @@ -0,0 +1,2 @@ +# Spider Boardman +$self->{LIBS} = ['']; diff --git a/ext/ODBM_File/hints/dec_osf.pl b/ext/ODBM_File/hints/dec_osf.pl index f041bf9..febb7cd 100644 --- a/ext/ODBM_File/hints/dec_osf.pl +++ b/ext/ODBM_File/hints/dec_osf.pl @@ -3,3 +3,7 @@ # Sat Jan 13 16:29:52 EST 1996 $self->{LDDLFLAGS} = $Config{lddlflags}; $self->{LDDLFLAGS} =~ s/-hidden//; +# As long as we're hinting, note the known location of the dbm routines. +# Spider Boardman +# Fri Feb 21 14:50:31 EST 1997 +$self->{LIBS} = ['-ldbm']; diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh index 6bde1b4..d50c4c6 100644 --- a/hints/dec_osf.sh +++ b/hints/dec_osf.sh @@ -1,9 +1,6 @@ # hints/dec_osf.sh -# -# How to make a DEBUGGING VERSION of perl for DECs cc compiler -# -# If you want to debug perl or want to send a +# * If you want to debug perl or want to send a # stack trace for inclusion into an bug report, call # Configure with the additional argument -Doptimize=-g2 # or uncomment this assignment to "optimize": @@ -13,19 +10,19 @@ # 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. +# * gcc can always have both -g and optimisation on. # -# Note 2: debugging optimised code, no matter what compiler +# * 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 3: Configure will automatically add the often quoted +# * Configure will automatically add the often quoted # -DDEBUGGING for you if the -g is specified. # -# Note 4: There is even more optimisation available in the new +# * There is even more optimisation available in the new # (GEM) DEC cc: -O5 and -fast. "man cc" will tell more about them. # The jury is still out whether either or neither help for Perl # and how much. Based on very quick testing, -fast boosts @@ -34,7 +31,7 @@ # hand searching things (index, m//, s///), seems to get slower. # Your mileage will vary. # -# Note 5: The -std is needed because the following compiled +# * The -std is needed because the following compiled # without the -std and linked with -lm # # #include @@ -45,6 +42,14 @@ # UNIX 4.0{,a} dump core: Floating point exception in the printf(), # the y has become a signaling NaN. # +# * Compilation warnings like: +# +# "Undefined the ANSI standard macro ..." +# +# can be ignored, at least while compiling the POSIX extension +# and especially if using the sfio (the latter is not a standard +# part of Perl, never mind if it says little to you). +# # If using the DEC compiler we must find out the DEC compiler style: # the style changed between Digital UNIX (aka DEC OSF/1) 3 and @@ -53,8 +58,13 @@ # and it is called GEM. Many of the options we are going to use depend # on the compiler style. -# do NOT, I repeat, *NOT* take away that leading tab +# do NOT, I repeat, *NOT* take away those leading tabs + # reset + _DEC_uname_r= _DEC_cc_style= + # set + _DEC_uname_r=`uname -r` + # _DEC_cc_style set soon below # Configure Black Magic (TM) case "$cc" in @@ -74,6 +84,17 @@ case "$cc" in ;; esac +# be nauseatingly ANSI +case "$cc" in +gcc) ccflags="$ccflags -ansi" + ;; +*) ccflags="$ccflags -std" + ;; +esac + +# for gcc the Configure knows about the -fpic: +# position-independent code for dynamic loading + # we want optimisation case "$optimize" in @@ -84,48 +105,60 @@ case "$optimize" in new) optimize='-O4' ;; old) optimize='-O2 -Olimit 3200' ;; esac + ccflags="$ccflags -D_INTRINSICS" ;; esac ;; esac -# all compilers are ANSI -ccflags="$ccflags -DSTANDARD_C" - -# be nauseatingly ANSI -case "$cc" in -gcc) ccflags="$ccflags -ansi" - ;; -*) ccflags="$ccflags -std" - ;; -esac - # dlopen() is in libc libswanted="`echo $libswanted | sed -e 's/ dl / /'`" -# PW contains nothing useful for perl +# libPW contains nothing useful for perl libswanted="`echo $libswanted | sed -e 's/ PW / /'`" -# bsd contains nothing used by perl that is not already in libc +# libbsd contains nothing used by perl that is not already in libc libswanted="`echo $libswanted | sed -e 's/ bsd / /'`" -# c need not be separately listed +# libc 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 / /'`" +# ndbm is already in libc +libswanted="`echo $libswanted | sed -e 's/ ndbm / /'`" # 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" +# Fancy compiler suites use optimising linker as well as compiler. +# +case "$_DEC_uname_r" in +*[123].*) # old loader + lddlflags="$lddlflags -O3" + ;; +*) lddlflags="$lddlflags $optimize -msym" + # -msym: If using a sufficiently recent /sbin/loader, + # keep the module symbols with the modules. + ;; +esac +# Yes, the above loses if gcc does not use the system linker. +# If that happens, let me know about it. + -# If debugging (-g) do not strip the objects, otherwise, strip. +# If debugging or (old systems and doing shared) +# then do not strip the lib, otherwise, strip. +# As noted above the -DDEBUGGING is added automagically by Configure if -g. case "$optimize" in *-g*) ;; # left intentionally blank +*) case "$_DEC_uname_r" in + *[123].*) + case "$useshrplib" in + false|undef|'') lddlflags="$lddlflags -s" ;; + esac + ;; *) lddlflags="$lddlflags -s" + ;; + esac + ;; esac # @@ -133,10 +166,37 @@ esac # unset _DEC_cc_style +unset _DEC_uname_r # # History: # +# perl5.003_28: +# +# 22-Feb-1997 Jarkko Hietaniemi +# +# * Restructuring Spider's suggestions. +# +# * Older Digital UNIXes cannot handle -Olimit ... for $lddlflags. +# +# * ld -s cannot be used in older Digital UNIXes when doing shared. +# +# +# 21-Feb-1997 Spider Boardman +# +# * -hidden removed. +# +# * -DSTANDARD_C removed. +# +# * -D_INTRINSICS added. (that -fast does not seem to buy much confirmed) +# +# * odbm not in libc, only ndbm. Therefore dbm back to $libswanted. +# +# * -msym for the newer runtime loaders. +# +# * $optimize also in $lddflags. +# +# # perl5.003_27: # # 18-Feb-1997 Jarkko Hietaniemi diff --git a/pdutest b/pdutest new file mode 100644 index 0000000..41f967c --- /dev/null +++ b/pdutest @@ -0,0 +1,37 @@ +#!/bin/sh + +# +# test perl compilation with different compilers and library schema +# + +for cc in cc gcc +do + for Duseshrplib in '' '-Duseshrplib' + do + rm -f config.sh *.a *.so *.o */*.o */*/*.o + log=log-$cc$Duseshrplib + rm -f $log + ( + nproc=`sizer -p` + if test -x /p/bin/pmake + then + make="pmake -J$nproc -L$nproc" + else + make="gmake -k -j$nproc;make" + fi + + date + sh Configure -ders -Dcc=$cc $Duseshrplib + date + + LD_LIBRARY_PATH=`pwd` + export LD_LIBRARY_PATH + + date + eval "$make test" + date + ) 2>&1 > $log + done +done + +# eof