diff options
Diffstat (limited to 'contrib/perl5/hints')
25 files changed, 725 insertions, 493 deletions
diff --git a/contrib/perl5/hints/README.hints b/contrib/perl5/hints/README.hints index 5f23b29c2cbd..066677195258 100644 --- a/contrib/perl5/hints/README.hints +++ b/contrib/perl5/hints/README.hints @@ -9,7 +9,7 @@ can't or doesn't guess properly. Most of these hint files have been tested with at least some version of perl5, but some are still left over from perl4. -Please send any problems or suggested changes to perlbug@perl.com. +Please send any problems or suggested changes to perlbug@perl.org. =head1 Hint file naming convention. diff --git a/contrib/perl5/hints/aix.sh b/contrib/perl5/hints/aix.sh index d6f3dd78e0f0..25a15e497984 100644 --- a/contrib/perl5/hints/aix.sh +++ b/contrib/perl5/hints/aix.sh @@ -128,6 +128,13 @@ d_setreuid='undef' # Tell perl which symbols to export for dynamic linking. case "$cc" in *gcc*) ccdlflags='-Xlinker' ;; +*) ccversion=`lslpp -L | grep 'C for AIX Compiler$' | awk '{print $2}'` + case "$ccversion" in + 4.4.0.0|4.4.0.1|4.4.0.2) + echo >&4 "*** This C compiler ($ccversion) is outdated." + echo >&4 "*** Please upgrade to at least 4.4.0.3." + ;; + esac esac # the required -bE:$installarchlib/CORE/perl.exp is added by # libperl.U (Configure) later. @@ -149,6 +156,20 @@ case "$osvers" in lddlflags="$lddlflags -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -b noentry -lc" ;; esac +# AIX 4.2 (using latest patchlevels on 20001130) has a broken bind +# library (getprotobyname and getprotobynumber are outversioned by +# the same calls in libc, at least for xlc version 3... +case "`oslevel`" in + 4.2.1.*) # Test for xlc version too, should we? + case "$ccversion" in # Don't know if needed for gcc + 3.1.4.*) # libswanted "bind ... c ..." => "... c bind ..." + set `echo X "$libswanted "| sed -e 's/ bind\( .*\) \([cC]\) / \1 \2 bind /'` + shift + libswanted="$*" + ;; + esac + ;; + esac # This script UU/usethreads.cbu will get 'called-back' by Configure # after it has prompted the user for whether to use threads. @@ -171,9 +192,9 @@ $define|true|[yY]*) ;; *) cat >&4 <<EOM -For pthreads you should use the AIX C compiler cc_r. -(now your compiler was set to '$cc') -Cannot continue, aborting. +*** For pthreads you should use the AIX C compiler cc_r. +*** (now your compiler was set to '$cc') +*** Cannot continue, aborting. EOM exit 1 ;; @@ -206,31 +227,47 @@ EOCBU cat > UU/uselargefiles.cbu <<'EOCBU' case "$uselargefiles" in ''|$define|true|[yY]*) - lfcflags="`getconf XBS5_ILP32_OFFBIG_CFLAGS 2>/dev/null`" - lfldflags="`getconf XBS5_ILP32_OFFBIG_LDFLAGS 2>/dev/null`" +# Keep these at the left margin. +ccflags_uselargefiles="`getconf XBS5_ILP32_OFFBIG_CFLAGS 2>/dev/null`" +ldflags_uselargefiles="`getconf XBS5_ILP32_OFFBIG_LDFLAGS 2>/dev/null`" # _Somehow_ in AIX 4.3.1.0 the above getconf call manages to # insert(?) *something* to $ldflags so that later (in Configure) evaluating # $ldflags causes a newline after the '-b64' (the result of the getconf). # (nothing strange shows up in $ldflags even in hexdump; - # so it may be something in the shell, instead?) + # so it may be something (a bug) in the shell, instead?) # Try it out: just uncomment the below line and rerun Configure: -# echo >&4 "AIX 4.3.1.0 $lfldflags mystery" ; exit 1 +# echo >&4 "AIX 4.3.1.0 $ldflags_uselargefiles mystery" ; exit 1 # Just don't ask me how AIX does it, I spent hours wondering. - # Therefore the line re-evaluating lfldflags: it seems to fix + # Therefore the line re-evaluating ldflags_uselargefiles: it seems to fix # the whatever it was that AIX managed to break. --jhi - lfldflags="`echo $lfldflags`" - lflibs="`getconf XBS5_ILP32_OFFBIG_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`" - case "$lfcflags$lfldflags$lflibs" in + ldflags_uselargefiles="`echo $ldflags_uselargefiles`" +# Keep this at the left margin. +libswanted_uselargefiles="`getconf XBS5_ILP32_OFFBIG_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`" + case "$ccflags_uselargefiles$ldflags_uselargefiles$libs_uselargefiles" in '');; - *) ccflags="$ccflags $lfcflags" - ldflags="$ldflags $lfldflags" - libswanted="$libswanted $lflibs" + *) ccflags="$ccflags $ccflags_uselargefiles" + ldflags="$ldflags $ldflags_uselargefiles" + libswanted="$libswanted $libswanted_uselargefiles" ;; esac - lfcflags='' - lfldflags='' - lflibs='' - ;; + case "$gccversion" in + '') ;; + *) + cat >&4 <<EOM + +*** Warning: gcc in AIX might not work with the largefile support of Perl +*** (default since 5.6.0), this combination hasn't been tested. +*** I will try, though. + +EOM + # Remove xlc-spefific -qflags. + ccflags="`echo $ccflags | sed -e 's@ -q[^ ]*@ @g' -e 's@^-q[^ ]* @@g'`" + ldflags="`echo $ldflags | sed -e 's@ -q[^ ]*@ @g' -e 's@^-q[^ ]* @@g'`" + echo >&4 "(using ccflags $ccflags)" + echo >&4 "(using ldflags $ldflags)" + ;; + esac + ;; esac EOCBU @@ -279,18 +316,18 @@ int main (void) EOCP set size if eval $compile_ok; then - lfcpuwidth=`./size` - echo "You are running on $lfcpuwidth bit hardware." + qacpuwidth=`./size` + echo "You are running on $qacpuwidth bit hardware." else dflt="32" echo " " echo "(I can't seem to compile the test program. Guessing...)" rp="What is the width of your CPU (in bits)?" . ./myread - lfcpuwidth="$ans" + qacpuwidth="$ans" fi $rm -f size.c size - case "$lfcpuwidth" in + case "$qacpuwidth" in 32*) cat >&4 <<EOM Bzzzt! At present, you can only perform a @@ -299,8 +336,8 @@ EOM exit 1 ;; esac - lfcflags="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`" - lfldflags="`getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`" + qacflags="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`" + qaldflags="`getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`" # See jhi's comments above regarding this re-eval. I've # seen similar weirdness in the form of: # @@ -309,8 +346,8 @@ EOM # error messages from 'cc -E' invocation. Again, the offending # string is simply not detectable by any means. Since it doesn't # do any harm, I didn't pursue it. -- sh - lfldflags="`echo $lfldflags`" - lflibs="`getconf XBS5_LP64_OFF64_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`" + qaldflags="`echo $qaldflags`" + qalibs="`getconf XBS5_LP64_OFF64_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`" # -q32 and -b32 may have been set by uselargefiles or user. # Remove them. ccflags="`echo $ccflags | sed -e 's@-q32@@'`" @@ -322,15 +359,15 @@ EOM trylist="`echo $trylist | sed -e 's@^ar @@' -e 's@ ar @ @g' -e 's@ ar$@@'`" ar="ar -X64" nm_opt="-X64 $nm_opt" - # Note: Placing the 'lfcflags' variable into the 'ldflags' string - # is NOT a typo. ldlflags is passed to the C compiler for final + # Note: Placing the 'qacflags' variable into the 'ldflags' string + # is NOT a typo. ldflags is passed to the C compiler for final # linking, and it wants -q64 (-b64 is for ld only!). - case "$lfcflags$lfldflags$lflibs" in + case "$qacflags$qaldflags$qalibs" in '');; - *) ccflags="$ccflags $lfcflags" - ldflags="$ldflags $lfcflags" - lddlflags="$lfldflags $lddlflags" - libswanted="$libswanted $lflibs" + *) ccflags="$ccflags $qacflags" + ldflags="$ldflags $qacflags" + lddlflags="$qaldflags $lddlflags" + libswanted="$libswanted $qalibs" ;; esac case "$ccflags" in @@ -344,10 +381,10 @@ EOM # Don't try backwards compatibility bincompat="$undef" d_bincompat5005="$undef" - lfcflags='' - lfldflags='' - lflibs='' - lfcpuwidth='' + qacflags='' + qaldflags='' + qalibs='' + qacpuwidth='' ;; esac EOCBU @@ -357,7 +394,10 @@ cat > UU/uselongdouble.cbu <<'EOCBU' # after it has prompted the user for whether to use long doubles. case "$uselongdouble" in $define|true|[yY]*) - ccflags="$ccflags -qlongdouble" + case "$cc" in + *gcc*) ;; + *) ccflags="$ccflags -qlongdouble" ;; + esac # The explicit cc128, xlc128, xlC128 are not needed, # the -qlongdouble should do the trick. --jhi d_Gconvert='sprintf((b),"%.*llg",(n),(x))' diff --git a/contrib/perl5/hints/bsdos.sh b/contrib/perl5/hints/bsdos.sh index c54a0c1606b0..58755434a385 100644 --- a/contrib/perl5/hints/bsdos.sh +++ b/contrib/perl5/hints/bsdos.sh @@ -3,8 +3,12 @@ # hints file for BSD/OS (adapted from bsd386.sh) # Original by Neil Bowers <neilb@khoros.unm.edu>; Tue Oct 4 12:01:34 EDT 1994 # Updated by Tony Sanders <sanders@bsdi.com>; Sat Aug 23 12:47:45 MDT 1997 -# Added 3.1 with ELF dynamic libraries (NOT in 3.1 yet. Estimated for 4.0) -# SYSV IPC tested Ok so I re-enabled. +# Added 3.1 with ELF dynamic libraries (NOT in 3.1 yet. +# Estimated for 4.0) SYSV IPC tested Ok so I re-enabled. +# +# Updated to work in post-4.0 by Todd C. Miller <millert@openbsd.org> +# +# Updated for threads by "Timur I. Bakeyev" <bsdi@listserv.bat.ru> # # To override the compiler on the command line: # ./Configure -Dcc=gcc2 @@ -18,7 +22,7 @@ d_voidsig='define' usemymalloc='n' # setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions. -# See http://www.bsdi.com/bsdi-man?setuid(2) +# See <A HREF="http://www.bsdi.com/bsdi-man?setuid">http://www.bsdi.com/bsdi-man?setuid</A>(2) d_setregid='undef' d_setreuid='undef' d_setrgid='undef' @@ -85,8 +89,8 @@ case "$osvers" in libswanted="Xpm Xaw Xmu Xt SM ICE Xext X11 $libswanted" libswanted="rpc curses termcap $libswanted" ;; -4.0*) - # ELF dynamic link libraries starting in 4.0 (???) +4.*) + # ELF dynamic link libraries starting in 4.0 useshrplib='true' so='so' dlext='so' @@ -94,13 +98,34 @@ case "$osvers" in case "$cc" in '') cc='cc' # cc is gcc2 in 4.0 cccdlflags="-fPIC" - ccdlflags=" " ;; + ccdlflags="-rdynamic -Wl,-rpath,$privlib/$archname/CORE" + ;; esac case "$ld" in '') ld='ld' lddlflags="-shared -x $lddlflags" ;; esac - ;; + # Due usage of static pointer from crt.o + libswanted="util $libswanted" ;; esac +# This script UU/usethreads.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use threads. +cat > UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in +$define|true|[yY]*) + case "$osvers" in + 3.*|4.*) ccflags="-D_REENTRANT $ccflags" + ;; + *) cat <<EOM >&4 +I did not know that BSD/OS $osvers supports POSIX threads. + +Feel free to tell perlbug@perl.org otherwise. +EOM + exit 1 + ;; + esac + ;; +esac +EOCBU diff --git a/contrib/perl5/hints/cygwin.sh b/contrib/perl5/hints/cygwin.sh index 42114c249f0a..c57d3f6fdf76 100644 --- a/contrib/perl5/hints/cygwin.sh +++ b/contrib/perl5/hints/cygwin.sh @@ -19,9 +19,13 @@ then plibpth=`cd $plibpth && pwd` fi so='dll' -# - eliminate -lc, implied by gcc +# - eliminate -lc, implied by gcc and a symlink to libcygwin.a libswanted=`echo " $libswanted " | sed -e 's/ c / /g'` -libswanted="$libswanted cygipc cygwin kernel32" +# - eliminate -lm, symlink to libcygwin.a +libswanted=`echo " $libswanted " | sed -e 's/ m / /g'` +libswanted="$libswanted cygipc" +test -z "$optimize" && optimize='-O2' +ccflags="$ccflags -DPERL_USE_SAFE_PUTENV" # - otherwise i686-cygwin archname='cygwin' @@ -34,11 +38,6 @@ ld='ld2' # - perl malloc needs to be unpolluted bincompat5005='undef' -# stubs (ENOSYS, not implemented) -d_chroot='undef' -d_seteuid='undef' -d_setegid='undef' - # Win9x problem with non-blocking read from a closed pipe d_eofnblk='define' diff --git a/contrib/perl5/hints/darwin.sh b/contrib/perl5/hints/darwin.sh index fd61e424b03c..8625798d5364 100644 --- a/contrib/perl5/hints/darwin.sh +++ b/contrib/perl5/hints/darwin.sh @@ -47,7 +47,7 @@ ld='cc'; so='dylib'; dlext='bundle'; dlsrc='dl_dyld.xs'; usedl='define'; -cccdlflags=''; +cccdlflags=' '; # space, not empty, because otherwise we get -fpic lddlflags="${ldflags} -bundle -undefined suppress"; ldlibpthname='DYLD_LIBRARY_PATH'; useshrplib='true'; diff --git a/contrib/perl5/hints/dec_osf.sh b/contrib/perl5/hints/dec_osf.sh index db7b869cf2be..ce3a40c77dbc 100644 --- a/contrib/perl5/hints/dec_osf.sh +++ b/contrib/perl5/hints/dec_osf.sh @@ -65,32 +65,42 @@ cc=${cc:-cc} # reset _DEC_cc_style= case "`$cc -v 2>&1 | grep cc`" in -*gcc*) _gcc_version=`$cc -v 2>&1 | grep "gcc version" | sed 's%^gcc version \([0-9]*\)\.\([0-9]*\) .*%\1 \2%'` +*gcc*) _gcc_version=`$cc --version 2>&1 | tr . ' '` set $_gcc_version - if test "$1" -lt 2 -o \( "$1" -eq 2 -a "$2" -lt 95 \); then + if test "$1" -lt 2 -o \( "$1" -eq 2 -a \( "$2" -lt 95 -o \( "$2" -eq 95 -a "$3" -lt 2 \) \) \); then cat >&4 <<EOF -Your cc seems to be gcc and its version seems to be less than 2.95. -This is not a good idea since old versions of gcc are known to produce -buggy code when compiling Perl (and no doubt for other programs, too). - -Therefore, I strongly suggest upgrading your gcc. (Why don't you -use the vendor cc is also a good question. It comes with the operating -system and produces good code.) - -Note that as of gcc 2.95 (19990728) and Perl 5.6.0 (end of March 2000) -if the said Perl is compiled with the said gcc the lib/sdbm test will -dump core. As this doesn't happen with the vendor cc, this is -most probably a lingering bug in gcc. Therefore unless you have -a better gcc you are still better off using the vendor cc. +*** Your cc seems to be gcc and its version ($_gcc_version) seems to be +*** less than 2.95.2. This is not a good idea since old versions of gcc +*** are known to produce buggy code when compiling Perl (and no doubt for +*** other programs, too). +*** +*** Therefore, I strongly suggest upgrading your gcc. (Why don't you use +*** the vendor cc is also a good question. It comes with the operating +*** system and produces good code.) Cannot continue, aborting. EOF exit 1 fi + if test "$1" -eq 2 -a "$2" -eq 95 -a "$3" -le 2; then + cat >&4 <<EOF + +*** Note that as of gcc 2.95.2 (19991024) and Perl 5.6.0 (March 2000) +*** if the said Perl is compiled with the said gcc the lib/sdbm test +*** may dump core (meaning that the SDBM_File extension is unusable). +*** As this core dump never happens with the vendor cc, this is most +*** probably a lingering bug in gcc. Therefore unless you have a better +*** gcc installation you are still better off using the vendor cc. + +Since you explicitly chose gcc, I assume that you know what are doing. + +EOF + fi ;; *) # compile something small: taint.c is fine for this. + ccversion=`cc -V | awk '/(Compaq|DEC) C/ {print $3}'` # the main point is the '-v' flag of 'cc'. case "`cc -v -I. -c taint.c -o taint$$.o 2>&1`" in */gemc_cc*) # we have the new DEC GEM CC diff --git a/contrib/perl5/hints/dos_djgpp.sh b/contrib/perl5/hints/dos_djgpp.sh index d50bca4b25e0..ebbd786b45e6 100644 --- a/contrib/perl5/hints/dos_djgpp.sh +++ b/contrib/perl5/hints/dos_djgpp.sh @@ -41,10 +41,13 @@ startperl='#!perl' case "X$optimize" in X) optimize="-O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2" + ldflags='-s' + ;; + X*) + ldflags=' ' ;; esac ccflags="$ccflags -DPERL_EXTERNAL_GLOB" -ldflags='-s' usemymalloc='n' timetype='time_t' diff --git a/contrib/perl5/hints/freebsd.sh b/contrib/perl5/hints/freebsd.sh index fd60ba3cb919..8eb6ac47b040 100644 --- a/contrib/perl5/hints/freebsd.sh +++ b/contrib/perl5/hints/freebsd.sh @@ -86,8 +86,6 @@ case "$osvers" in d_setegid='undef' d_seteuid='undef' ;; -# -# Guesses at what will be needed after 2.2 *) usevfork='true' usemymalloc='n' libswanted=`echo $libswanted | sed 's/ malloc / /'` @@ -179,7 +177,7 @@ $define|true|[yY]*) 0*|1*|2.0*|2.1*) cat <<EOM >&4 I did not know that FreeBSD $osvers supports POSIX threads. -Feel free to tell perlbug@perl.com otherwise. +Feel free to tell perlbug@perl.org otherwise. EOM exit 1 ;; @@ -189,7 +187,8 @@ EOM POSIX threads are not supported well by FreeBSD $osvers. Please consider upgrading to at least FreeBSD 2.2.8, -or preferably to 3.something. +or preferably to the most recent -RELEASE or -STABLE +version (see http://www.freebsd.org/releases/). (While 2.2.7 does have pthreads, it has some problems with the combination of threads and pipes and therefore diff --git a/contrib/perl5/hints/hpux.sh b/contrib/perl5/hints/hpux.sh index ce15f552b44b..464f301427d0 100644 --- a/contrib/perl5/hints/hpux.sh +++ b/contrib/perl5/hints/hpux.sh @@ -23,6 +23,11 @@ # HP-UX 10 pthreads hints: Matthew T Harden <mthard@mthard1.monsanto.com> # From: Dominic Dunlop <domo@computer.org> # Abort and offer advice if bundled (non-ANSI) C compiler selected +# From: H.Merijn Brand <h.m.brand@hccnet.nl> +# ccversion detection +# perl/64/HP-UX wants libdb-3.0 to be shared ELF 64 +# generic pthread support detection for PTH package + # This version: March 8, 2000 # Current maintainer: Jeff Okamoto <okamoto@corp.hp.com> @@ -105,9 +110,13 @@ EOM ;; esac +cc=${cc:-cc} + case `$cc -v 2>&1`"" in *gcc*) ccisgcc="$define" ;; -*) ccisgcc='' ;; +*) ccisgcc='' + ccversion=`which cc | xargs what | awk '/Compiler/{print $2}'` + ;; esac # Determine the architecture type of this system. @@ -154,7 +163,6 @@ $define|true|[yY]*) 64-bit compilation is not supported on HP-UX $xxOsRevMajor. You need at least HP-UX 11.0. Cannot continue, aborting. - EOM exit 1 fi @@ -167,7 +175,6 @@ EOM *** You do not seem to have the 64-bit libraries in /lib/pa20_64. *** Most importantly, I cannot find the $libc. *** Cannot continue, aborting. - EOM exit 1 fi @@ -175,6 +182,7 @@ EOM ccflags="$ccflags +DD64" ldflags="$ldflags +DD64" test -d /lib/pa20_64 && loclibpth="$loclibpth /lib/pa20_64" + libswanted="$libswanted pthread" libscheck='case "`/usr/bin/file $xxx`" in *LP64*|*PA-RISC2.0*) ;; *) xxx=/no/64-bit$xxx ;; @@ -321,6 +329,7 @@ case "$usethreads" in $define|true|[yY]*) if [ "$xxOsRevMajor" -lt 10 ]; then cat <<EOM >&4 + HP-UX $xxOsRevMajor cannot support POSIX threads. Consider upgrading to at least HP-UX 11. Cannot continue, aborting. @@ -329,33 +338,56 @@ EOM fi case "$xxOsRevMajor" in 10) - # Under 10.X, a threaded perl can be built, but it needs - # libcma and OLD_PTHREADS_API. Also <pthread.h> needs to - # be #included before any other includes (in perl.h) - if [ ! -f /usr/include/pthread.h -o ! -f /usr/lib/libcma.sl ]; then + # Under 10.X, a threaded perl can be built + if [ -f /usr/include/pthread.h ]; then + if [ -f /usr/lib/libcma.sl ]; then + # DCE (from Core OS CD) is installed + + # It needs # libcma and OLD_PTHREADS_API. Also <pthread.h> + # needs to be #included before any other includes + # (in perl.h) + + # HP-UX 10.X uses the old pthreads API + d_oldpthreads="$define" + + # include libcma before all the others + libswanted="cma $libswanted" + + # tell perl.h to include <pthread.h> before other include files + ccflags="$ccflags -DPTHREAD_H_FIRST" + + # CMA redefines select to cma_select, and cma_select expects int * + # instead of fd_set * (just like 9.X) + selecttype='int *' + + elif [ -f /usr/lib/libpthread.sl ]; then + # PTH package is installed + libswanted="pthread $libswanted" + else + libswanted="no_threads_available" + fi + else + libswanted="no_threads_available" + fi + + if [ $libswanted = "no_threads_available" ]; then cat <<EOM >&4 + In HP-UX 10.X for POSIX threads you need both of the files -/usr/include/pthread.h and /usr/lib/libcma.sl. -Either you must install the CMA package or you must upgrade to HP-UX 11. -Cannot continue, aborting. -EOM - exit 1 - fi +/usr/include/pthread.h and either /usr/lib/libcma.sl or /usr/lib/libpthread.sl. +Either you must upgrade to HP-UX 11 or install a posix thread library: - # HP-UX 10.X uses the old pthreads API - case "$d_oldpthreads" in - '') d_oldpthreads="$define" ;; - esac + DCE-CoreTools from HP-UX 10.20 Hardware Extensions 3.0 CD (B3920-13941) - # include libcma before all the others - libswanted="cma $libswanted" +or - # tell perl.h to include <pthread.h> before other include files - ccflags="$ccflags -DPTHREAD_H_FIRST" + PTH package from http://hpux.tn.tudelft.nl/hppd/hpux/alpha.html + +Cannot continue, aborting. +EOM + exit 1 + fi - # CMA redefines select to cma_select, and cma_select expects int * - # instead of fd_set * (just like 9.X) - selecttype='int *' ;; 11 | 12) # 12 may want upping the _POSIX_C_SOURCE datestamp... ccflags=" -D_POSIX_C_SOURCE=199506L $ccflags" @@ -387,8 +419,10 @@ cat > UU/uselargefiles.cbu <<'EOCBU' case "$uselargefiles" in ''|$define|true|[yY]*) # there are largefile flags available via getconf(1) - # but we cheat for now. - ccflags="$ccflags -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + # but we cheat for now. (Keep that in the left margin.) +ccflags_uselargefiles="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + + ccflags="$ccflags $ccflags_uselargefiles" if test -z "$ccisgcc" -a -z "$gccversion"; then # The strict ANSI mode (-Aa) doesn't like large files. diff --git a/contrib/perl5/hints/irix_6.sh b/contrib/perl5/hints/irix_6.sh index 9d9852d04919..e6117cf1af91 100644 --- a/contrib/perl5/hints/irix_6.sh +++ b/contrib/perl5/hints/irix_6.sh @@ -32,6 +32,14 @@ # Don't bother with -n32 unless you have the 7.1 or later compilers. # But there's no quick and light-weight way to check in 6.2. +# NOTE: some IRIX cc versions, e.g. 7.3.1.1m (try cc -version) have +# been known to have issues (coredumps) when compiling perl.c. +# If you've used -OPT:fast_io=ON and this happens, try removing it. +# If that fails, or you didn't use that, then try adjusting other +# optimization options (-LNO, -INLINE, -O3 to -O2, etcetera). +# The compiler bug has been reported to SGI. +# -- Allen Smith <easmith@beatrice.rutgers.edu> + # Let's assume we want to use 'cc -n32' by default, unless the # necessary libm is missing (which has happened at least twice) case "$cc" in @@ -40,7 +48,13 @@ case "$cc" in *) test -f /usr/lib32/libm.so && cc='cc -n32' ;; esac esac -test -z "$cc" && cc=cc + +cc=${cc:-cc} + +case "$cc" in +*gcc*) ;; +*) ccversion=`cc -version` ;; +esac case "$use64bitint" in $define|true|[yY]*) @@ -77,9 +91,19 @@ esac case "$cc" in *"cc -n32"*) - libscheck='case "`/usr/bin/file $xxx`" in -*N32*) ;; -*) xxx=/no/n32$xxx ;; + # If a library is requested to link against, make sure the + # objects in the library are of the same ABI we are compiling + # against. Albert Chin-A-Young <china@thewrittenword.com> + libscheck='case "$xxx" in +*.a) /bin/ar p $xxx `/bin/ar t $xxx | /usr/bsd/head -1` >$$.o; + case "`/usr/bin/file $$.o`" in + *N32*) rm -f $$.o ;; + *) rm -f $$.o; xxx=/no/n32$xxx ;; + esac ;; +*) case "`/usr/bin/file $xxx`" in + *N32*) ;; + *) xxx=/no/n32$xxx ;; + esac ;; esac' # NOTE: -L/usr/lib32 -L/lib32 are automatically selected by the linker @@ -93,7 +117,7 @@ esac' libc='/usr/lib32/libc.so' plibpth='/usr/lib32 /lib32 /usr/ccs/lib' ;; -*"cc -64") +*"cc -64"*) loclibpth="$loclibpth /usr/lib64" libscheck='case "`/usr/bin/file $xxx`" in @@ -138,7 +162,7 @@ esac # Settings common to both native compiler modes. case "$cc" in -*"cc -n32"|*"cc -64") +*"cc -n32"*|*"cc -64"*) ld=$cc # perl's malloc can return improperly aligned buffer @@ -216,8 +240,10 @@ esac # Don't groan about unused libraries. ldflags="$ldflags -Wl,-woff,84" +# workaround for an optimizer bug case "`$cc -version 2>&1`" in -*7.2.*) op_cflags='optimize=-O1' ;; # workaround for an optimizer bug +*7.2.*) op_cflags='optimize=-O1'; opmini_cflags='optimize=-O1' ;; +*7.3.1.*) op_cflags='optimize=-O2'; opmini_cflags='optimize=-O2' ;; esac # We don't want these libraries. diff --git a/contrib/perl5/hints/linux.sh b/contrib/perl5/hints/linux.sh index 4fb2f89e7c2a..a6b2bd985ab0 100644 --- a/contrib/perl5/hints/linux.sh +++ b/contrib/perl5/hints/linux.sh @@ -189,7 +189,7 @@ fi rm -f try.c a.out -if /bin/bash -c exit; then +if /bin/sh -c exit; then echo '' echo 'You appear to have a working bash. Good.' else @@ -282,7 +282,10 @@ cat > UU/uselargefiles.cbu <<'EOCBU' # after it has prompted the user for whether to use large files. case "$uselargefiles" in ''|$define|true|[yY]*) - ccflags="$ccflags -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +# Keep this in the left margin. +ccflags_uselargefiles="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + + ccflags="$ccflags $ccflags_uselargefiles" ;; esac EOCBU diff --git a/contrib/perl5/hints/machten.sh b/contrib/perl5/hints/machten.sh index b4409c1bf0be..3a311a1746a3 100644 --- a/contrib/perl5/hints/machten.sh +++ b/contrib/perl5/hints/machten.sh @@ -15,6 +15,9 @@ # Martijn Koster <m.koster@webcrawler.com> # Richard Yeh <rcyeh@cco.caltech.edu> # +# Deny system's false claims to support mmap() and munmap(); note +# also that Sys V IPC (re)disabled by jhi due to continuing inadequacy +# -- Dominic Dunlop <domo@computer.org> 001111 # Remove dynamic loading libraries from search; enable SysV IPC with # MachTen 4.1.4 and above; define SYSTEM_ALIGN_BYTES for old MT versions # -- Dominic Dunlop <domo@computer.org> 000224 @@ -46,10 +49,7 @@ # # MachTen 4.1.1's support for shadow password file access is incomplete: # disable its use completely. -d_endspent=${d_endspent:-undef} -d_getspent=${d_getspent:-undef} d_getspnam=${d_getspnam:-undef} -d_setspent=${d_setspent:-undef} # MachTen 4.1.1 does support dynamic loading, but perl doesn't # know how to use it yet. @@ -200,6 +200,11 @@ if test "$d_shm" = ""; then esac fi +# MachTen has stubs for mmap and munmap(), but they just result in the +# caller being killed on the grounds of "Bad system call" +d_mmap=${d_mmap:-undef} +d_munmap=${d_munmap:-undef} + # Get rid of some extra libs which it takes Configure a tediously # long time never to find on MachTen, or which break perl set `echo X "$libswanted "|sed -e 's/ net / /' -e 's/ socket / /' \ @@ -231,6 +236,8 @@ During Configure, you may see the message as well as similar messages concerning \$d_sem and \$d_shm. Select the default answers: MachTen 4.1 appears to provide System V IPC support, but it is incomplete and buggy: perl should be built without it. +Similar considerations apply to memory mapping of files, controlled +by \$d_mmap and \$d_munmap. Similarly, when you see @@ -241,10 +248,9 @@ Similarly, when you see select the default answer: vfork() works, and avoids expensive data copying. -You may also see "WHOA THERE!!!" messages concerning \$d_endspent, -\$d_getspent, \$d_getspnam and \$d_setspent. In all cases, select the -default answer: MachTen's support for shadow password file access is -incomplete, and should not be used. +You may also see "WHOA THERE!!!" messages concerning \$d_getspnam. +Select the default answer: MachTen's support for shadow password +file access is incomplete, and should not be used. At the end of Configure, you will see a harmless message diff --git a/contrib/perl5/hints/mint.sh b/contrib/perl5/hints/mint.sh index ab55e612e100..b9a7886f9ad5 100644 --- a/contrib/perl5/hints/mint.sh +++ b/contrib/perl5/hints/mint.sh @@ -53,7 +53,6 @@ d_fsetpos='fpos_t' gidtype='gid_t' groupstype='gid_t' lseektype='long' -models='none' modetype='mode_t' sizetype='size_t' timetype='time_t' diff --git a/contrib/perl5/hints/mpeix.sh b/contrib/perl5/hints/mpeix.sh index 556d22148c62..d2ca5f09af47 100644 --- a/contrib/perl5/hints/mpeix.sh +++ b/contrib/perl5/hints/mpeix.sh @@ -10,9 +10,10 @@ # Created for 5.003 by Mark Klein, mklein@dis.com. # Substantially revised for 5.004_01 by Mark Bixby, markb@cccd.edu. # Revised again for 5.004_69 by Mark Bixby, markb@cccd.edu. +# Revised for 5.6.0 by Mark Bixby, mbixby@power.net. # osname='mpeix' -osvers='5.5' # Isn't there a way to determine this dynamically? +osvers=`uname -r | sed -e 's/.[A-Z]\.\([0-9]\)\([0-9]\)\.[0-9][0-9]/\1.\2/'` # # Force Configure to use our wrapper mpeix/nm script # @@ -53,16 +54,34 @@ toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"' # Linking. # lddlflags='-b' -# What if you want additional libs (e.g. gdbm)? -# This should remove the unwanted libraries from $libswanted and -# add on whatever ones are needed instead. -libs="$libs -lbind -lsyslog -lcurses -lsvipc -lsocket -lm -lc" +# Delete bsd and BSD from the library list. Remove other randomly ordered +# libraries and then re-add them in their proper order (the MPE linker is +# order-sensitive). Add additional MPE-specific libraries. +for mpe_remove in bind bsd BSD c curses m socket str svipc syslog; do + set `echo " $libswanted " | sed -e 's/ / /g' -e "s/ $mpe_remove //"` + libswanted="$*" +done +libswanted="$libswanted bind syslog curses svipc socket str m c" loclibpth="$loclibpth /usr/local/lib /usr/contrib/lib /BIND/PUB/lib /SYSLOG/PUB" # # External functions and data items. # -# Does Configure *really* get *all* of these wrong? +# Q: Does Configure *really* get *all* of these wrong? # +# A: Yes. There are two MPE problems here. The 'undef' functions exist on MPE, +# but are merely dummy routines that return ENOTIMPL or ESYSERR. Since they're +# useless, let's just tell Perl to avoid them. Also, a few data items are +# 'undef' because while they may exist in structures, they are uninitialized. +# +# The 'define' cases are a bit weirder. MPE has a libc.a, libc.sl, and two +# special kernel shared libraries, /SYS/PUB/XL and /SYS/PUB/NL. Much of what +# is in libc.a is duplicated within XL and NL, so when we created libc.sl, we +# omitted the duplicated functions. Since Configure end ups scanning libc.sl, +# we need to 'define' the functions that had been removed. +# +# We don't want to scan XL or NL because we would find way too many POSIX or +# Unix named functions that are really vanilla MPE functions that do something +# completely different than on POSIX or Unix. d_crypt='define' d_difftime='define' d_dlerror='undef' @@ -100,7 +119,7 @@ d_wctomb='define' # # Include files. # -i_termios='undef' +i_termios='undef' # we have termios, but not the full set (just tcget/setattr) i_time='define' i_systime='undef' i_systimek='undef' @@ -109,3 +128,8 @@ timeincl='/usr/include/time.h' # Data types. # timetype='time_t' +# +# Functionality. +# +bincompat5005="$undef" +uselargefiles="$undef" diff --git a/contrib/perl5/hints/openbsd.sh b/contrib/perl5/hints/openbsd.sh index a7d8bf2950af..25781577ff26 100644 --- a/contrib/perl5/hints/openbsd.sh +++ b/contrib/perl5/hints/openbsd.sh @@ -26,8 +26,9 @@ d_setruid=$undef # # Not all platforms support dynamic loading... # -case `arch` in -OpenBSD.alpha|OpenBSD.mips|OpenBSD.powerpc|OpenBSD.vax) +ARCH=`arch|sed 's/^OpenBSD.//'` +case "${ARCH}-${osvers}" in +alpha-*|mips-*|vax-*|powerpc-2.[0-7]|m88k-*) usedl=$undef ;; *) @@ -37,7 +38,15 @@ OpenBSD.alpha|OpenBSD.mips|OpenBSD.powerpc|OpenBSD.vax) # we use -fPIC here because -fpic is *NOT* enough for some of the # extensions like Tk on some OpenBSD platforms (ie: sparc) cccdlflags="-DPIC -fPIC $cccdlflags" - lddlflags="-Bshareable $lddlflags" + case "$osvers" in + [01].*|2.[0-7]|2.[0-7].*) + lddlflags="-Bshareable $lddlflags" + ;; + *) # from 2.8 onwards + ld=${cc:-cc} + lddlflags="-shared -fPIC $lddlflags" + ;; + esac ;; esac @@ -60,7 +69,14 @@ d_suidsafe=$define # cc is gcc so we can do better than -O # Allow a command-line override, such as -Doptimize=-g -test "$optimize" || optimize='-O2' +case "$ARCH" in +m88k) + optimize='-O0' + ;; +*) + test "$optimize" || optimize='-O2' + ;; +esac # This script UU/usethreads.cbu will get 'called-back' by Configure # after it has prompted the user for whether to use threads. @@ -87,6 +103,9 @@ case "$openbsd_distribution" in sysman='/usr/share/man/man1' libpth='/usr/lib' glibpth='/usr/lib' + # Local things, however, do go in /usr/local + siteprefix='/usr/local' + siteprefixexp='/usr/local' # Ports installs non-std libs in /usr/local/lib so look there too locincpth='/usr/local/include' loclibpth='/usr/local/lib' diff --git a/contrib/perl5/hints/os2.sh b/contrib/perl5/hints/os2.sh index 1d9df3683f8a..5ffa589d310c 100644 --- a/contrib/perl5/hints/os2.sh +++ b/contrib/perl5/hints/os2.sh @@ -93,7 +93,7 @@ if test "$libemx" = "X"; then echo "Cannot find C library!" >&2; fi libpth="`echo \"$LIBRARY_PATH\" | tr ';\\\' ' /'`" libpth="$libpth $libemx/mt $libemx" -set `emxrev -f emxlibcm` +set `cmd /c emxrev -f emxlibcm` emxcrtrev=$5 # indented to not put it into config.sh _defemxcrtrev=-D_EMX_CRT_REV_=$emxcrtrev @@ -249,6 +249,8 @@ nm_opt='-p' ####### We define these functions ourselves +d_strtoll='define' +d_strtoull='define' d_getprior='define' d_setprior='define' @@ -281,8 +283,14 @@ case "$0$running_c_cmd" in # Not patched! if test -f ./Configure.cmd ; then echo "!!!" >&2 - echo "!!! ./Configure not patched, but ./Configure.cmd exits" >&2 - echo "!!! Do not know what to do!" >&2 + echo "!!! I see that what is running is ./Configure." >&2 + echo "!!! ./Configure is not patched, but ./Configure.cmd exists." >&2 + echo "!!!" >&2 + echo "!!! You are supposed to run Configure.cmd, not Configure" >&2 + echo "!!! after an automagic patching." >&2 + echo "!!!" >&2 + echo "!!! If you insist on running Configure, please" >&2 + echo "!!! patch it manually from ./os2/diff.configure." >&2 echo "!!!" >&2 exit 2 fi @@ -306,10 +314,6 @@ case "$0$running_c_cmd" in *) echo "!!! Apparently we are running a renamed Configure: '$0'." >&2 esac -# Copy pod: - -cp -uf ./README.os2 ./pod/perlos2.pod - # This script UU/usethreads.cbu will get 'called-back' by Configure # after it has prompted the user for whether to use threads. cat > UU/usethreads.cbu <<'EOCBU' diff --git a/contrib/perl5/hints/os390.sh b/contrib/perl5/hints/os390.sh index d6f68212422a..4eff5a82174c 100644 --- a/contrib/perl5/hints/os390.sh +++ b/contrib/perl5/hints/os390.sh @@ -3,7 +3,8 @@ # OS/390 hints by David J. Fiander <davidf@mks.com> # # OS/390 OpenEdition Release 3 Mon Sep 22 1997 thanks to: -# +# +# John Goodyear <johngood@us.ibm.com> # John Pfuntner <pfuntner@vnet.ibm.com> # Len Johnson <lenjay@ibm.net> # Bud Huff <BAHUFF@us.oracle.com> @@ -15,53 +16,148 @@ # # To get ANSI C, we need to use c89, and ld doesn't exist -cc='c89' -ld='c89' -# To link via definition side decks we need the dll option -cccdlflags='-W 0,dll,"langlvl(extended)"' -# c89 hides most of the useful header stuff, _ALL_SOURCE turns it on again, +# You can override this with Configure -Dcc=gcc -Dld=ld. +case "$cc" in +'') cc='c89' ;; +esac +case "$ld" in +'') ld='c89' ;; +esac + +# -DMAXSIG=38 maximum signal number +# -DOEMVS is used in place of #ifdef __MVS__ in certain places. +# -D_OE_SOCKETS alters system headers. +# -D_XOPEN_SOURCE_EXTENDEDA alters system headers. +# c89 hides most of the useful header stuff, _ALL_SOURCE turns it on again. # YYDYNAMIC ensures that the OS/390 yacc generated parser is reentrant. -# -DEBCDIC should come from Configure. -ccflags='-DMAXSIG=38 -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC' -# Turning on optimization breaks perl -optimize='none' +# -DEBCDIC should come from Configure and need not be mentioned here. +# Prepend your favorites with Configure -Dccflags=your_favorites +case "$ccflags" in +'') ccflags='-DMAXSIG=38 -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC' ;; +*) ccflags="$ccflags -DMAXSIG=38 -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC" ;; +esac -alignbytes=8 +# Turning on optimization breaks perl. +# You can override this with Configure -Doptimize='-O' or somesuch. +case "$optimize" in +'') optimize='none' ;; +esac + +# To link via definition side decks we need the dll option +# You can override this with Configure -Ucccdlflags or somesuch. +case "$cccdlflags" in +'') cccdlflags='-W 0,dll' ;; +esac + +case "$so" in +'') so='a' ;; +esac -usemymalloc='n' +case "$alignbytes" in +'') alignbytes=8 ;; +esac -so='a' +case "$usemymalloc" in +'') usemymalloc='n' ;; +esac # On OS/390, libc.a doesn't really hold anything at all, # so running nm on it is pretty useless. -usenm='n' +# You can override this with Configure -Dusenm. +case "$usenm" in +'') usenm='false' ;; +esac -# Dynamic loading doesn't work on OS/390 quite yet -usedl='n' -dlext='none' +# Setting ldflags='-Wl,EDIT=NO' will get rid of the symbol +# information at the end of the executable (=> smaller binaries). +# Override this option with -Dldflags='whatever else you wanted'. +case "$ldflags" in +'') ldflags='-Wl,EDIT=NO' ;; +esac -# Configure can't figure this out for some reason -d_shmatprototype='define' +# In order to build with dynamic be sure to specify: +# Configure -Dusedl +# Do not forget to add $archlibexp/CORE to your LIBPATH. +# You might want to override some of this with things like: +# Configure -Dusedl -Ddlext=so -Ddlsrc=dl_dllload.xs. +case "$usedl" in +'') + usedl='n' + case "$dlext" in + '') dlext='none' ;; + esac + ;; +define) + case "$useshrplib" in + '') useshrplib='true' ;; + esac + case "$dlsrc" in + '') dlsrc='dl_dllload.xs' ;; + esac + # For performance use 'so' at or beyond v2.8, 'dll' for 2.7 and prior versions + case "`uname -v`x`uname -r`" in + 02x0[89].*|02x1[0-9].*|[0-9][3-9]x*) + so='so' + case "$dlext" in + '') dlext='so' ;; + esac + ;; + *) + so='dll' + case "$dlext" in + '') dlext='dll' ;; + esac + ;; + esac + libperl="libperl.$so" + ccflags="$ccflags -D_SHR_ENVIRON -DPERL_EXTERNAL_GLOB -Wc,dll" + cccdlflags='-c -Wc,dll,EXPORTALL' + # The following will need to be modified for the installed libperl.x. + # The modification to Config.pm is done by the installperl script after the build and test. + ccdlflags="-W l,dll `pwd`/libperl.x" + lddlflags="-W l,dll `pwd`/libperl.x" + ;; +esac +# even on static builds using LIBPATH should be OK. +case "$ldlibpthname" in +'') ldlibpthname=LIBPATH ;; +esac -usenm='false' -i_time='define' -i_systime='define' +# Header files to include. +# You can override these with Configure -Ui_time -Ui_systime. +case "$i_time" in +'') i_time='define' ;; +esac +case "$i_systime" in +'') i_systime='define' ;; +esac # (from aix.sh) # uname -m output is too specific and not appropriate here # osname should come from Configure -# +# You can override this with Configure -Darchname='s390' but please don't. case "$archname" in '') archname="$osname" ;; esac -archobjs=ebcdic.o - -# We have our own cppstdin. -echo 'cat >.$$.c; '"$cc"' -E -Wc,NOLOC ${1+"$@"} .$$.c; rm .$$.c' > cppstdin +# We have our own cppstdin script. This is not a variable since +# Configure sees the presence of the script file. +# We put system header -D definitions in so that Configure +# can find the shmat() prototype in <sys/shm.h> and various +# other things. Unfortunately, cppflags occurs too late to be of +# value external to the script. This may need to be revisited +# under a compiler other than c89. +case "$usedl" in +define) +echo 'cat >.$$.c; '"$cc"' -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -D_SHR_ENVIRON -E -Wc,NOLOC ${1+"$@"} .$$.c; rm .$$.c' > cppstdin + ;; +*) +echo 'cat >.$$.c; '"$cc"' -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -E -Wc,NOLOC ${1+"$@"} .$$.c; rm .$$.c' > cppstdin + ;; +esac # -# Note that Makefile.SH employs a bare yacc to generate +# Note that Makefile.SH employs a bare yacc command to generate # perly.[hc] and a2p.[hc], hence you may wish to: # # alias yacc='myyacc' diff --git a/contrib/perl5/hints/posix-bc.sh b/contrib/perl5/hints/posix-bc.sh index ec21bc327e44..62752339920c 100644 --- a/contrib/perl5/hints/posix-bc.sh +++ b/contrib/perl5/hints/posix-bc.sh @@ -6,37 +6,89 @@ # thanks to the authors of the os390.sh # -# To get ANSI C, we need to use c89, and ld doesn't exist -cc='c89' -ld='c89' +# To get ANSI C, we need to use c89, and ld does not exist +# You can override this with Configure -Dcc=gcc -Dld=ld. +case "$cc" in +'') cc='c89' ;; +esac +case "$ld" in +'') ld='c89' ;; +esac # C-Flags: -ccflags='-DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED' +# -DPOSIX_BC +# -DUSE_PURE_BISON +# -D_XOPEN_SOURCE_EXTENDED alters system headers. +# Prepend your favorites with Configure -Dccflags=your_favorites +case "$ccflags" in +'') ccflags='-K enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED' ;; +*) ccflags='$ccflags -Kenum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED' ;; +esac + +# ccdlflags have yet to be determined. +#case "$ccdlflags" in +#'') ccdlflags='-c' ;; +#esac + +# cccdlflags have yet to be determined. +#case "$cccdlflags" in +#'') cccdlflags='' ;; +#esac + +# ldflags have yet to be determined. +#case "$ldflags" in +#'') ldflags='' ;; +#esac + +# lddlflags have yet to be determined. +#case "$lddlflags" in +#'') lddlflags='' ;; +#esac # Flags on a RISC-Host (SUNRISE): if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then echo echo "Congratulations, you are running a machine with Sunrise CPUs." echo "Let's hope you have the matching RISC compiler as well." - ccflags='-K risc_4000 -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED' + ccflags="-K risc_4000 $ccflags" ldflags='-K risc_4000' fi # Turning on optimization breaks perl (CORE-DUMP): -optimize='none' +# You can override this with Configure -Doptimize='-O' or somesuch. +case "$optimize" in +'') optimize='none' ;; +esac # we don''t use dynamic memorys (yet): -so='none' -usedl='no' -dlext='none' +case "$so" in +'') so='none' ;; +esac -# On BS2000/Posix, libc.a doesn't really hold anything at all, -# so running nm on it is pretty useless. -usenm='no' - -# other Options: +case "$usemymalloc" in +'') usemymalloc='n' ;; +esac -usemymalloc='no' +# On BS2000/Posix, libc.a does not really hold anything at all, +# so running nm on it is pretty useless. +# You can override this with Configure -Dusenm. +case "$usenm" in +'') usenm='false' ;; +esac -archobjs=ebcdic.o +# Dynamic loading doesn't work on OS/390 quite yet. +# You can override this with +# Configure -Dusedl -Ddlext=.so -Ddlsrc=dl_dllload.xs. +case "$usedl" in +'') usedl='n' ;; +esac +case "$dlext" in +'') dlext='none' ;; +esac +#case "$dlsrc" in +#'') dlsrc='none' ;; +#esac +#case "$ldlibpthname" in +#'') ldlibpthname=LIBPATH ;; +#esac diff --git a/contrib/perl5/hints/powerux.sh b/contrib/perl5/hints/powerux.sh index 4070c01767e4..dc1b3d07f063 100644 --- a/contrib/perl5/hints/powerux.sh +++ b/contrib/perl5/hints/powerux.sh @@ -63,7 +63,7 @@ lddlflags='-Zlink=so' # i_ndbm='undef' -# I have no clude what perl thinks it wants <sys/mode.h> for, but if +# I have no clue what perl thinks it wants <sys/mode.h> for, but if # you include it in a program in PowerMAX without first including # <sys/vnode.h> the code don't compile... # diff --git a/contrib/perl5/hints/solaris_2.sh b/contrib/perl5/hints/solaris_2.sh index 8aee6d40dc00..0bf5bab3afdc 100644 --- a/contrib/perl5/hints/solaris_2.sh +++ b/contrib/perl5/hints/solaris_2.sh @@ -1,35 +1,48 @@ # hints/solaris_2.sh -# Last modified: Tue Apr 13 13:12:49 EDT 1999 +# Last modified: Tue Jan 2 10:16:35 2001 +# Lupe Christoph <lupe@lupe-christoph.de> +# Based on version by: # Andy Dougherty <doughera@lafayette.edu> -# Based on input from lots of folks, especially +# Which was based on input from lots of folks, especially # Dean Roehrich <roehrich@ironwood-fddi.cray.com> +# Additional input from Alan Burlison, Jarkko Hietaniemi, +# and Richard Soderberg. +# +# See README.solaris for additional information. +# +# For consistency with gcc, we do not adopt Sun Marketing's +# removal of the '2.' prefix from the Solaris version number. +# (Configure tries to detect an old fixincludes and needs +# this information.) # If perl fails tests that involve dynamic loading of extensions, and # you are using gcc, be sure that you are NOT using GNU as and ld. One # way to do that is to invoke Configure with -# +# # sh Configure -Dcc='gcc -B/usr/ccs/bin/' # # (Note that the trailing slash is *required*.) # gcc will occasionally emit warnings about "unused prefix", but # these ought to be harmless. See below for more details. - + # See man vfork. usevfork=false d_suidsafe=define # Avoid all libraries in /usr/ucblib. -set `echo $glibpth | sed -e 's@/usr/ucblib@@'` +# /lib is just a symlink to /usr/lib +set `echo $glibpth | sed -e 's@/usr/ucblib@@' -e 's@ /lib @ @'` glibpth="$*" -# Remove bad libraries. -lucb contains incompatible routines. -# -lld doesn't do anything useful. +# Remove unwanted libraries. -lucb contains incompatible routines. +# -lld and -lsec don't do anything useful. -lcrypt does not +# really provide anything we need over -lc, so we drop it, too. # -lmalloc can cause a problem with GNU CC & Solaris. Specifically, # libmalloc.a may allocate memory that is only 4 byte aligned, but # GNU CC on the Sparc assumes that doubles are 8 byte aligned. # Thanks to Hallvard B. Furuseth <h.b.furuseth@usit.uio.no> -set `echo " $libswanted " | sed -e 's@ ld @ @' -e 's@ malloc @ @' -e 's@ ucb @ @'` +set `echo " $libswanted " | sed -e 's@ ld @ @' -e 's@ malloc @ @' -e 's@ ucb @ @' -e 's@ sec @ @' -e 's@ crypt @ @'` libswanted="$*" # Look for architecture name. We want to suggest a useful default. @@ -45,42 +58,35 @@ case "$archname" in ;; esac -test -z "`${cc:-cc} -V 2>&1|grep -i workshop`" || ccisworkshop="$define" -test -z "`${cc:-cc} -v 2>&1|grep -i gcc`" || ccisgcc="$define" - -cat >UU/workshoplibpth.cbu<<'EOCBU' +cat > UU/workshoplibpth.cbu << 'EOCBU' +# This script UU/workshoplibpth.cbu will get 'called-back' +# by other CBUs this script creates. case "$workshoplibpth_done" in -'') case "$use64bitall" in - "$define"|true|[yY]*) - loclibpth="$loclibpth /usr/lib/sparcv9" - if test -n "$workshoplibs"; then - loclibpth=`echo $loclibpth | sed -e "s% $workshoplibs%%" ` - for lib in $workshoplibs; do - # Logically, it should be sparcv9. - # But the reality fights back, it's v9. - loclibpth="$loclibpth $lib/sparcv9 $lib/v9" - done - fi + '') if test `uname -p` = "sparc"; then + case "$use64bitall" in + "$define"|true|[yY]*) + # add SPARC-specific 64 bit libraries + loclibpth="$loclibpth /usr/lib/sparcv9" + if test -n "$workshoplibs"; then + loclibpth=`echo $loclibpth | sed -e "s% $workshoplibs%%" ` + for lib in $workshoplibs; do + # Logically, it should be sparcv9. + # But the reality fights back, it's v9. + loclibpth="$loclibpth $lib/sparcv9 $lib/v9" + done + fi ;; - *) loclibpth="$loclibpth $workshoplibs" + *) loclibpth="$loclibpth $workshoplibs" ;; esac + else + loclibpth="$loclibpth $workshoplibs" + fi workshoplibpth_done="$define" ;; esac EOCBU -case "$ccisworkshop" in -"$define") - cat >try.c <<EOF -#include <sunmath.h> -int main() { return(0); } -EOF - workshoplibs=`cc -### try.c -lsunmath -o try 2>&1|grep " -Y "|sed 's%.* -Y "P,\(.*\)".*%\1%'|tr ':' '\n'|grep '/SUNWspro/'` - . ./UU/workshoplibpth.cbu - ;; -esac - ###################################################### # General sanity testing. See below for excerpts from the Solaris FAQ. # @@ -90,12 +96,12 @@ esac # To: perl5-porters@africa.nicoh.com # Subject: Re: On perl5/solaris/gcc # -# Here's another draft of the perl5/solaris/gcc sanity-checker. +# Here's another draft of the perl5/solaris/gcc sanity-checker. case `type ${cc:-cc}` in */usr/ucb/cc*) cat <<END >&4 -NOTE: Some people have reported problems with /usr/ucb/cc. +NOTE: Some people have reported problems with /usr/ucb/cc. If you have difficulties, please make sure the directory containing your C compiler is before /usr/ucb in your PATH. @@ -153,7 +159,7 @@ if grep GNU make.vers > /dev/null 2>&1; then case "`/usr/bin/ls -lL $tmp`" in ??????s*) cat <<END >&2 - + NOTE: Your PATH points to GNU make, and your GNU make has the set-group-id bit set. You must either rearrange your PATH to put /usr/ccs/bin before the GNU utilities or you must ask your system administrator to disable the @@ -165,31 +171,33 @@ END fi rm -f make.vers -# XXX EXPERIMENTAL A.D. 2/27/1998 -# XXX This script UU/cc.cbu will get 'called-back' by Configure after it -# XXX has prompted the user for the C compiler to use. -cat > UU/cc.cbu <<'EOSH' +cat > UU/cc.cbu <<'EOCBU' +# This script UU/cc.cbu will get 'called-back' by Configure after it +# has prompted the user for the C compiler to use. + # If the C compiler is gcc: # - check the fixed-includes # - check as(1) and ld(1), they should not be GNU # (GNU as and ld 2.8.1 and later are reportedly ok, however.) # If the C compiler is not gcc: +# - Check if it is the Workshop/Forte compiler. +# If it is, prepare for 64 bit and long doubles. # - check as(1) and ld(1), they should not be GNU # (GNU as and ld 2.8.1 and later are reportedly ok, however.) # # Watch out in case they have not set $cc. -# Perl compiled with some combinations of GNU as and ld may not +# Perl compiled with some combinations of GNU as and ld may not # be able to perform dynamic loading of extensions. If you have a # problem with dynamic loading, be sure that you are using the Solaris # /usr/ccs/bin/as and /usr/ccs/bin/ld. You can do that with # sh Configure -Dcc='gcc -B/usr/ccs/bin/' -# (note the trailing slash is required). +# (note the trailing slash is required). # Combinations that are known to work with the following hints: # # gcc-2.7.2, GNU as 2.7, GNU ld 2.7 # egcs-1.0.3, GNU as 2.9.1 and GNU ld 2.9.1 -# --Andy Dougherty <doughera@lafayette.edu> +# --Andy Dougherty <doughera@lafayette.edu> # Tue Apr 13 17:19:43 EDT 1999 # Get gcc to share its secrets. @@ -202,12 +210,6 @@ if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then # Using gcc. # - tmp=`echo "$verbose" | grep '^Reading' | - awk '{print $NF}' | sed 's/specs$/include/'` - - # Determine if the fixed-includes look like they'll work. - # Doesn't work anymore for gcc-2.7.2. - # See if as(1) is GNU as(1). GNU as(1) might not work for this job. if echo "$verbose" | grep ' /usr/ccs/bin/as ' >/dev/null 2>&1; then : @@ -272,6 +274,23 @@ else # Not using gcc. # + ccversion="`${cc:-cc} -V 2>&1|sed -n -e '1s/^cc: //p'`" + case "$ccversion" in + *WorkShop*) ccname=workshop ;; + *) ccversion='' ;; + esac + + case "$ccname" in + workshop) + cat >try.c <<EOM +#include <sunmath.h> +int main() { return(0); } +EOM + workshoplibs=`cc -### try.c -lsunmath -o try 2>&1|sed -n '/ -Y /s%.* -Y "P,\(.*\)".*%\1%p'|tr ':' '\n'|grep '/SUNWspro/'` + . ./workshoplibpth.cbu + ;; + esac + # See if as(1) is GNU as(1). GNU might not work for this job. case `as --version < /dev/null 2>&1` in *GNU*) @@ -288,22 +307,12 @@ END # See if ld(1) is GNU ld(1). GNU ld(1) might not work for this job. # ld --version doesn't properly report itself as a GNU tool, # as of ld version 2.6, so we need to be more strict. TWP 9/5/96 - gnu_ld=false - case `ld --version < /dev/null 2>&1` in - *GNU*|ld\ version\ 2*) - gnu_ld=true ;; - *) ;; - esac - if $gnu_ld ; then : + # Sun's ld always emits the "Software Generation Utilities" string. + if ld -V 2>&1 | grep "ld: Software Generation Utilities" >/dev/null 2>&1; then + # Ok, ld is /usr/ccs/bin/ld. + : else - # Try to guess from path - case `type ld | awk '{print $NF}'` in - *gnu*|*GNU*|*FSF*) - gnu_ld=true ;; - esac - fi - if $gnu_ld ; then - cat <<END >&2 + cat <<END >&2 NOTE: You are apparently using GNU ld(1). GNU ld(1) might not build Perl. You should arrange to use /usr/ccs/bin/ld, perhaps by adding /usr/ccs/bin @@ -319,17 +328,21 @@ rm -f try try.c rm -f core # XXX -EOSH +EOCBU cat > UU/usethreads.cbu <<'EOCBU' -# This script UU/usethreads.cbu will get 'called-back' by Configure +# This script UU/usethreads.cbu will get 'called-back' by Configure # after it has prompted the user for whether to use threads. case "$usethreads" in $define|true|[yY]*) ccflags="-D_REENTRANT $ccflags" - # sched_yield is in -lposix4 - set `echo X "$libswanted "| sed -e 's/ c / posix4 pthread c /'` + # sched_yield is in -lposix4 up to Solaris 2.6, in -lrt starting with Solaris 2.7 + case `uname -r` in + 5.[0-6] | 5.5.1) sched_yield_lib="posix4" ;; + *) sched_yield_lib="rt"; + esac + set `echo X "$libswanted "| sed -e "s/ c / $sched_yield_lib pthread c /"` shift libswanted="$*" @@ -343,18 +356,18 @@ $define|true|[yY]*) cat >try.c <<'EOM' /* Test for sig(set|long)jmp bug. */ #include <setjmp.h> - + main() { sigjmp_buf env; int ret; - + ret = sigsetjmp(env, 1); if (ret) { return ret == 2; } siglongjmp(env, 2); } EOM - if test "`arch`" = i86pc -a "$osvers" = 2.6 && \ + if test "`arch`" = i86pc -a `uname -r` = 5.6 && \ ${cc:-cc} try.c -lpthread >/dev/null 2>&1 && ./a.out; then d_sigsetjmp=$undef cat << 'EOM' >&2 @@ -370,27 +383,42 @@ esac EOCBU cat > UU/uselargefiles.cbu <<'EOCBU' -# This script UU/uselargefiles.cbu will get 'called-back' by Configure +# This script UU/uselargefiles.cbu will get 'called-back' by Configure # after it has prompted the user for whether to use large files. case "$uselargefiles" in ''|$define|true|[yY]*) - ccflags="$ccflags `getconf LFS_CFLAGS 2>/dev/null`" - ldflags="$ldflags `getconf LFS_LDFLAGS 2>/dev/null`" - libswanted="$libswanted `getconf LFS_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`" + +# Keep these in the left margin. +ccflags_uselargefiles="`getconf LFS_CFLAGS 2>/dev/null`" +ldflags_uselargefiles="`getconf LFS_LDFLAGS 2>/dev/null`" +libswanted_uselargefiles="`getconf LFS_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`" + + ccflags="$ccflags $ccflags_uselargefiles" + ldflags="$ldflags $ldflags_uselargefiles" + libswanted="$libswanted $libswanted_uselargefiles" ;; esac EOCBU -cat > UU/use64bitint.cbu <<'EOCBU' -# This script UU/use64bitint.cbu will get 'called-back' by Configure +# This is truly a mess. +case "$usemorebits" in +"$define"|true|[yY]*) + use64bitint="$define" + uselongdouble="$define" + ;; +esac + +if test `uname -p` = "sparc"; then + cat > UU/use64bitint.cbu <<'EOCBU' +# This script UU/use64bitint.cbu will get 'called-back' by Configure # after it has prompted the user for whether to use 64 bit integers. case "$use64bitint" in "$define"|true|[yY]*) case "`uname -r`" in - 2.[1-6]) + 5.[0-4]) cat >&4 <<EOM -Solaris `uname -r` does not support 64-bit integers. -You should upgrade to at least Solaris 2.7. +Solaris `uname -r|sed -e 's/^5\./2./'` does not support 64-bit integers. +You should upgrade to at least Solaris 2.5. EOM exit 1 ;; @@ -399,11 +427,20 @@ EOM esac EOCBU -cat > UU/use64bitall.cbu <<'EOCBU' -# This script UU/use64bitall.cbu will get 'called-back' by Configure + cat > UU/use64bitall.cbu <<'EOCBU' +# This script UU/use64bitall.cbu will get 'called-back' by Configure # after it has prompted the user for whether to be maximally 64 bitty. case "$use64bitall-$use64bitall_done" in "$define-"|true-|[yY]*-) + case "`uname -r`" in + 5.[0-6]) + cat >&4 <<EOM +Solaris `uname -r|sed -e 's/^5\./2./'` does not support 64-bit pointers. +You should upgrade to at least Solaris 2.7. +EOM + exit 1 + ;; + esac libc='/usr/lib/sparcv9/libc.so' if test ! -f $libc; then cat >&4 <<EOM @@ -413,21 +450,25 @@ Cannot continue, aborting. EOM exit 1 - fi - . ./UU/workshoplibpth.cbu + fi + . ./workshoplibpth.cbu case "$cc -v 2>/dev/null" in *gcc*) echo 'main() { return 0; }' > try.c - if ${cc:-cc} -mcpu=v9 -m64 -S try.c 2>&1 | grep -e \ - '-m64 is not supported by this configuration'; then + case "`${cc:-cc} -mcpu=v9 -m64 -S try.c 2>&1 | grep 'm64 is not supported by this configuration'`" in + *"m64 is not supported"*) cat >&4 <<EOM -Full 64-bit build not supported by this configuration. +Full 64-bit build is not supported by this gcc configuration. +Check http://gcc.gnu.org/ for the latest news of availability +of gcc for 64-bit Sparc. + Cannot continue, aborting. EOM exit 1 - fi + ;; + esac ccflags="$ccflags -mcpu=v9 -m64" if test X`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null` != X; then ccflags="$ccflags -Wa,`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`" @@ -444,236 +485,47 @@ EOM ldflags="$ldflags `getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`" lddlflags="$lddlflags -G `getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`" ;; - esac + esac libscheck='case "`/usr/bin/file $xxx`" in *64-bit*|*SPARCV9*) ;; *) xxx=/no/64-bit$xxx ;; esac' + use64bitall_done=yes ;; esac EOCBU - -# Actually, we want to run this already now, if so requested, -# because we need to fix up things right now. -case "$use64bitall" in -"$define"|true|[yY]*) - . ./UU/use64bitall.cbu + + # Actually, we want to run this already now, if so requested, + # because we need to fix up things right now. + case "$use64bitall" in + "$define"|true|[yY]*) + # CBUs expect to be run in UU + cd UU; . ./use64bitall.cbu; cd .. ;; -esac + esac +fi cat > UU/uselongdouble.cbu <<'EOCBU' -# This script UU/uselongdouble.cbu will get 'called-back' by Configure +# This script UU/uselongdouble.cbu will get 'called-back' by Configure # after it has prompted the user for whether to use long doubles. -case "$uselongdouble-$uselongdouble_done" in -"$define-"|true-|[yY]*-) - case "$ccisworkshop" in - '') cat >&4 <<EOM +case "$uselongdouble" in +"$define"|true|[yY]*) + if test -f /opt/SUNWspro/lib/libsunmath.so; then + libs="$libs -lsunmath" + ldflags="$ldflags -L/opt/SUNWspro/lib -R/opt/SUNWspro/lib" + d_sqrtl=define + else + cat >&4 <<EOM -I do not see the Sun Workshop compiler; therefore I do not see -the libsunmath; therefore I do not know how to do long doubles, sorry. -I'm disabling the use of long doubles. +The Sun Workshop math library is not installed; therefore I do not +know how to do long doubles, sorry. I'm disabling the use of long +doubles. EOM uselongdouble="$undef" - ;; - *) libswanted="$libswanted sunmath" - loclibpth="$loclibpth /opt/SUNWspro/lib" - ;; - esac - uselongdouble_done=yes + fi ;; esac EOCBU -# Actually, we want to run this already now, if so requested, -# because we need to fix up things right now. -case "$uselongdouble" in -"$define"|true|[yY]*) - . ./UU/uselongdouble.cbu - ;; -esac - -rm -f try.c try.o try -# keep that leading tab - ccisworkshop='' - ccisgcc='' - -# This is just a trick to include some useful notes. -cat > /dev/null <<'End_of_Solaris_Notes' - -Here are some notes kindly contributed by Dean Roehrich. - ------ -Generic notes about building Perl5 on Solaris: -- Use /usr/ccs/bin/make. -- If you use GNU make, remove its setgid bit. -- Remove all instances of *ucb* from your path. -- Make sure libucb is not in /usr/lib (it should be in /usr/ucblib). -- Do not use GNU as or GNU ld, or any of GNU binutils or GNU libc. -- Do not use /usr/ucb/cc. -- Do not change Configure's default answers, except for the path names. -- Do not use -lmalloc. -- Do not build on SunOS 4 and expect it to work properly on SunOS 5. -- /dev/fd must be mounted if you want set-uid scripts to work. - - -Here are the gcc-related questions and answers from the Solaris 2 FAQ. Note -the themes: - - run fixincludes - - run fixincludes correctly - - don't use GNU as or GNU ld - -Question 5.7 covers the __builtin_va_alist problem people are always seeing. -Question 6.1.3 covers the GNU as and GNU ld issues which are always biting -people. -Question 6.9 is for those who are still trying to compile Perl4. - -The latest Solaris 2 FAQ can be found in the following locations: - rtfm.mit.edu:/pub/usenet-by-group/comp.sys.sun.admin - ftp.fwi.uva.nl:/pub/solaris - -Perl5 comes with a script in the top-level directory called "myconfig" which -will print a summary of the configuration in your config.sh. My summary for -Solaris 2.4 and gcc 2.6.3 follows. I have also built with gcc 2.7.0 and the -results are identical. This configuration was generated with Configure's -d -option (take all defaults, don't bother prompting me). All tests pass for -Perl5.001, patch.1m. - -Summary of my perl5 (patchlevel 1) configuration: - Platform: - osname=solaris, osver=2.4, archname=sun4-solaris - uname='sunos poplar 5.4 generic_101945-27 sun4d sparc ' - hint=recommended - Compiler: - cc='gcc', optimize='-O', ld='gcc' - cppflags='' - ccflags ='' - ldflags ='' - stdchar='unsigned char', d_stdstdio=define, usevfork=false - voidflags=15, castflags=0, d_casti32=define, d_castneg=define - intsize=4, alignbytes=8, usemymalloc=y, randbits=15 - Libraries: - so=so - libpth=/lib /usr/lib /usr/ccs/lib /usr/local/lib - libs=-lsocket -lnsl -ldl -lm -lc -lcrypt - libc=/usr/lib/libc.so - Dynamic Linking: - dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef - cccdlflags='-fpic', ccdlflags=' ', lddlflags='-G' - - -Dean -roehrich@cray.com -9/7/95 - ------------ - -From: Casper.Dik@Holland.Sun.COM (Casper H.S. Dik - Network Security Engineer) -Subject: Solaris 2 Frequently Asked Questions (FAQ) 1.48 -Date: 25 Jul 1995 12:20:18 GMT - -5.7) Why do I get __builtin_va_alist or __builtin_va_arg_incr undefined? - - You're using gcc without properly installing the gcc fixed - include files. Or you ran fixincludes after installing gcc - w/o moving the gcc supplied varargs.h and stdarg.h files - out of the way and moving them back again later. This often - happens when people install gcc from a binary distribution. - If there's a tmp directory in gcc's include directory, fixincludes - didn't complete. You should have run "just-fixinc" instead. - - Another possible cause is using ``gcc -I/usr/include.'' - -6.1) Where is the C compiler or where can I get one? - - [...] - - 3) Gcc. - - Gcc is available from the GNU archives in source and binary - form. Look in a directory called sparc-sun-solaris2 for - binaries. You need gcc 2.3.3 or later. You should not use - GNU as or GNU ld. Make sure you run just-fixinc if you use - a binary distribution. Better is to get a binary version and - use that to bootstrap gcc from source. - - [...] - - When you install gcc, don't make the mistake of installing - GNU binutils or GNU libc, they are not as capable as their - counterparts you get with Solaris 2.x. - -6.9) I can't get perl 4.036 to compile or run. - - Run Configure, and use the solaris_2_0 hints, *don't* use - the solaris_2_1 hints and don't use the config.sh you may - already have. First you must make sure Configure and make - don't find /usr/ucb/cc. (It must use gcc or the native C - compiler: /opt/SUNWspro/bin/cc) - - Some questions need a special answer. - - Are your system (especially dbm) libraries compiled with gcc? [y] y - - yes: gcc 2.3.3 or later uses the standard calling - conventions, same as Sun's C. - - Any additional cc flags? [ -traditional -Dvolatile=__volatile__ - -I/usr/ucbinclude] -traditional -Dvolatile=__volatile__ - Remove /usr/ucbinclude. - - Any additional libraries? [-lsocket -lnsl -ldbm -lmalloc -lm - -lucb] -lsocket -lnsl -lm - - Don't include -ldbm, -lmalloc and -lucb. - - Perl 5 compiled out of the box. - -7.0) 64-bitness, from Alan Burlison (added by jhi 2000-02-21) - - You need a machine running Solaris 2.7 or above. - - Here's some rules: - - 1. Solaris 2.7 and above will run in either 32 bit or 64 bit mode, - via a reboot. - 2. You can build 64 bit apps whilst running 32 bit mode and vice-versa. - 3. 32 bit apps will run under Solaris running in either 32 or 64 bit mode. - 4. 64 bit apps require Solaris to be running 64 bit mode - 5. It is possible to select the appropriate 32 or 64 bit version of an - app at run-time using isaexec(3). - 6. You can detect the OS mode using "isainfo -v", e.g. - fubar$ isainfo -v # Ultra 30 in 64 bit mode - 64-bit sparcv9 applications - 32-bit sparc applications - 7. To compile 64 bit you need to use the flag "-xarch=v9". - getconf(1) will tell you this, e.g. - fubar$ getconf -a | grep v9 - XBS5_LP64_OFF64_CFLAGS: -xarch=v9 - XBS5_LP64_OFF64_LDFLAGS: -xarch=v9 - XBS5_LP64_OFF64_LINTFLAGS: -xarch=v9 - XBS5_LPBIG_OFFBIG_CFLAGS: -xarch=v9 - XBS5_LPBIG_OFFBIG_LDFLAGS: -xarch=v9 - XBS5_LPBIG_OFFBIG_LINTFLAGS: -xarch=v9 - _XBS5_LP64_OFF64_CFLAGS: -xarch=v9 - _XBS5_LP64_OFF64_LDFLAGS: -xarch=v9 - _XBS5_LP64_OFF64_LINTFLAGS: -xarch=v9 - _XBS5_LPBIG_OFFBIG_CFLAGS: -xarch=v9 - _XBS5_LPBIG_OFFBIG_LDFLAGS: -xarch=v9 - _XBS5_LPBIG_OFFBIG_LINTFLAGS: -xarch=v9 - - > > Now, what should we do, then? Should -Duse64bits in a v9 box cause - > > Perl to compiled in v9 mode? Or should we for compatibility stick - > > with 32 bit builds and let the people in the know to add the -xarch=v9 - > > to ccflags (and ldflags?)? - - > I think the second (explicit) mechanism should be the default. Unless - > you want to allocate more than ~ 4Gb of memory inside Perl, you don't - > need Perl to be a 64-bit app. Put it this way, on a machine running - > Solaris 8, there are 463 executables under /usr/bin, but only 15 of - > those require 64 bit versions - mainly because they invade the kernel - > address space, e.g. adb, kgmon etc. Certainly we don't recommend users - > to build 64 bit apps unless they need the address space. - -End_of_Solaris_Notes - +rm -f try.c try.o try a.out diff --git a/contrib/perl5/hints/svr4.sh b/contrib/perl5/hints/svr4.sh index 8109b3975287..69af6fda2f2f 100644 --- a/contrib/perl5/hints/svr4.sh +++ b/contrib/perl5/hints/svr4.sh @@ -135,6 +135,22 @@ case "`uname -sm`" in ;; esac +# NCR MP-RAS. Thanks to Doug Hendricks for this info. +# The output of uname -a looks like this +# foo foo 4.0 3.0 3441 Pentium III(TM)-ISA/PCI +# Configure sets osname=svr4.0, osvers=3.0, archname='3441-svr4.0' +case "$myuname" in +*3441*) + # With the NCR High Performance C Compiler R3.0c, miniperl fails + # t/op/regexp.t test 461 unless we compile with optimizie=-g. + # The whole O/S is being phased out, so more detailed probing + # is probably not warranted. + case "$optimize" in + '') optimize='-g' ;; + esac + ;; +esac + # Configure may fail to find lstat() since it's a static/inline function # in <sys/stat.h> on Unisys U6000 SVR4, UnixWare 2.x, and possibly other # SVR4 derivatives. (Though UnixWare has it in /usr/ccs/lib/libc.so.) diff --git a/contrib/perl5/hints/titanos.sh b/contrib/perl5/hints/titanos.sh index cea99f82a3a2..88a3e7a96304 100644 --- a/contrib/perl5/hints/titanos.sh +++ b/contrib/perl5/hints/titanos.sh @@ -12,7 +12,6 @@ intsize='4' usenm='true' nm_opt='-eh' malloctype='void *' -models='none' ccflags="$ccflags -I/usr/include/net -DDEBUGGING -DSTANDARD_C" cppflags="$cppflags -I/usr/include/net -DDEBUGGING -DSTANDARD_C" stdchar='unsigned char' diff --git a/contrib/perl5/hints/unicos.sh b/contrib/perl5/hints/unicos.sh index 7ffd73fbcc04..089b9600e265 100644 --- a/contrib/perl5/hints/unicos.sh +++ b/contrib/perl5/hints/unicos.sh @@ -2,13 +2,21 @@ case `uname -r` in 6.1*) shellflags="-m+65536" ;; esac case "$optimize" in -'') optimize="-O1" ;; +# If we used fastmd (the default) integer values would be limited to 46 bits. +# --Mark P. Lutz +'') optimize="$optimize -h nofastmd" ;; esac -d_setregid='undef' -d_setreuid='undef' +# The default is to die in runtime on math overflows. +# Let's not do that. --jhi +ccflags="$ccflags -h matherror=errno" +# Give int((2/3)*3) a chance to be 2, not 1. --jhi +ccflags="$ccflags -h rounddiv" +# Avoid an optimizer bug where a volatile variables +# isn't correctly saved and restored --Mark P. Lutz +pp_ctl_cflags='ccflags="$ccflags -h scalar0 -h vector0"' case "$usemymalloc" in '') # The perl malloc.c SHOULD work says Ilya. - # But for the time being (5.004_68), alas, it doesn't. + # But for the time being (5.004_68), alas, it doesn't. --jhi # usemymalloc='y' # ccflags="$ccflags -DNO_RCHECK" usemymalloc='n' @@ -16,3 +24,6 @@ case "$usemymalloc" in esac # Configure gets fooled for some reason. There is no getpgid(). d_getpgid='undef' +# These exist but do not really work. +d_setregid='undef' +d_setreuid='undef' diff --git a/contrib/perl5/hints/uts.sh b/contrib/perl5/hints/uts.sh index 9ad72d7e9870..2bae4b0acf2d 100644 --- a/contrib/perl5/hints/uts.sh +++ b/contrib/perl5/hints/uts.sh @@ -1,2 +1,18 @@ -ccflags="$ccflags -DCRIPPLED_CC" -d_lstat=define +archname='s390' +cc='cc -Xa' +cccdlflags='-pic' +d_bincompat3='undef' +d_csh='undef' +d_lstat='define' +d_suidsafe='define' +dlsrc='dl_dlopen.xs' +ld='ld' +lddlflags='-G -z text' +libperl='libperl.so' +libpth='/lib /usr/lib /usr/ccs/lib' +libs='-lsocket -lnsl -ldl -lm' +optimize='undef' +prefix='psf_prefix' +static_ext='none' +dynamic_ext='Fcntl IO Opcode Socket' +useshrplib='define' diff --git a/contrib/perl5/hints/vmesa.sh b/contrib/perl5/hints/vmesa.sh index bc033878229e..0213853fec92 100644 --- a/contrib/perl5/hints/vmesa.sh +++ b/contrib/perl5/hints/vmesa.sh @@ -24,7 +24,7 @@ d_access='define' d_alarm='define' d_archlib='define' # randbits='15' -archobjs="ebcdic.o vmesa.o" +archobjs="vmesa.o" d_attribut='undef' d_bcmp='define' d_bcopy='define' @@ -294,7 +294,6 @@ make='gnumake' mallocobj='' mallocsrc='' malloctype='void *' -models='none' netdb_hlen_type='size_t' netdb_host_type='char *' netdb_name_type='const char *' |