diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-28 14:10:13 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-28 14:10:13 +0000 |
commit | c723583c8d66639e876d9fdcd29b12ea591418d2 (patch) | |
tree | 316f85df67980f291394c1d5dbee568cffe63472 /hints | |
parent | c102638c8fb55e92563d5ee4166f31857d9102fc (diff) | |
download | perl-c723583c8d66639e876d9fdcd29b12ea591418d2.tar.gz |
New HP-UX hints from Merijn.
p4raw-id: //depot/perl@9892
Diffstat (limited to 'hints')
-rw-r--r-- | hints/hpux.sh | 90 |
1 files changed, 54 insertions, 36 deletions
diff --git a/hints/hpux.sh b/hints/hpux.sh index 8623715654..da481dac38 100644 --- a/hints/hpux.sh +++ b/hints/hpux.sh @@ -37,24 +37,12 @@ echo "Archname is $archname" ### HP-UX OS specific behaviour -case "$ccflags" in -'') cc_cppflags='' ;; -*) set `echo " $ccflags " | sed -e 's/ -A[ea] / /g' -e 's/ -D_HPUX_SOURCE / /'` - cc_cppflags="$* -D_HPUX_SOURCE" - ;; -esac -ccflags="-Ae $cc_cppflags" -cppflags="-Aa -D__STDC_EXT__ $cc_cppflags" - -case "$prefix" in - "") prefix='/opt/perl5' ;; - esac - # -ldbm is obsolete and should not be used # -lBSD contains BSD-style duplicates of SVR4 routines that cause confusion # -lPW is obsolete and should not be used # The libraries crypt, malloc, ndir, and net are empty. -set `echo " $libswanted " | sed -e 's/ ld / /' -e 's/ dbm / /' -e 's/ BSD / /' -e 's/ PW / /'` +set `echo "X $libswanted " | sed -e 's/ ld / /' -e 's/ dbm / /' -e 's/ BSD / /' -e 's/ PW / /'` +shift libswanted="$*" # By setting the deferred flag below, this means that if you run perl @@ -71,17 +59,30 @@ libswanted="$*" ccdlflags="-Wl,-E -Wl,-B,deferred $ccdlflags" cc=${cc:-cc} +ar=/usr/bin/ar # Yes, truly override. We do not want the GNU ar. +full_ar=$ar # I repeat, no GNU ar. arrr. -ar=/usr/bin/ar # Yes, truly override. We do not want the GNU ar. -full_ar=$ar # I repeat, no GNU ar. arrr. +set `echo "X $ccflags " | sed -e 's/ -A[ea] / /' -e 's/ -D_HPUX_SOURCE / /'` +shift + cc_cppflags="$* -D_HPUX_SOURCE" +cppflags="-Aa -D__STDC_EXT__ $cc_cppflags" + +case "$prefix" in + "") prefix='/opt/perl5' ;; + esac case `$cc -v 2>&1`"" in - *gcc*) ccisgcc="$define" ;; - *) ccisgcc='' - ccversion=`which cc | xargs what | awk '/Compiler/{print $2}'` + *gcc*) ccisgcc="$define" + ccflags="$cc_cppflags" case "`getconf KERNEL_BITS 2>/dev/null`" in - *64*) ldflags="$ldflags -Wl,+vnocompatwarnings" ;; + *64*) ldflags="$ldflags -Wl,+vnocompatwarnings" + ccflags="$ccflags -Wl,+vnocompatwarnings -Wa,+DA2.0" + ;; esac + ;; + *) ccisgcc='' + ccversion=`which cc | xargs what | awk '/Compiler/{print $2}'` + ccflags="-Ae $cc_cppflags" case "$d_casti32" in "") d_casti32='undef' ;; esac @@ -175,37 +176,54 @@ case "$ccisgcc" in $define|true|[Yy]) case "$optimize" in - "") optimize="-g -O" ;; + "") optimize="-g -O" ;; + *O[3456789]*) optimize=`echo "$optimize" | sed -e 's/O[3-9]/O2/'` ;; esac - ld="$cc" + #ld="$cc" + ld="/usr/bin/ld" cccdlflags='-fPIC' - lddlflags='-shared' + #lddlflags='-shared' + lddlflags='-b +vnocompatwarnings' + case "$optimize" in + *-g*-O*|*-O*-g*) + # gcc without gas will not accept -g + echo "main(){}">try.c + case "`$cc $optimize -c try.c 2>&1`" in + *"-g option disabled"*) + set `echo "X $optimize " | sed -e 's/ -g / /'` + shift + optimize="$*" + ;; + esac + ;; + esac ;; *) # HP's compiler cannot combine -g and -O case "$optimize" in - "") optimize="-O" ;; + "") optimize="-O" ;; + *O[3456789]*) optimize=`echo "$optimize" | sed -e 's/O[3-9]/O2/'` ;; esac ld=/usr/bin/ld cccdlflags='+Z' - lddlflags='-b' + lddlflags='-b +vnocompatwarnings' ;; esac ## LARGEFILES -case "$uselargefiles-$ccisgcc" in - "$define-$define"|'-define') - cat <<EOM >&4 - -*** I'm ignoring large files for this build because -*** I don't know how to do use large files in HP-UX using gcc. - -EOM - uselargefiles="$undef" - ;; - esac +#case "$uselargefiles-$ccisgcc" in +# "$define-$define"|'-define') +# cat <<EOM >&4 +# +#*** I'm ignoring large files for this build because +#*** I don't know how to do use large files in HP-UX using gcc. +# +#EOM +# uselargefiles="$undef" +# ;; +# esac cat >UU/uselargefiles.cbu <<'EOCBU' # This script UU/uselargefiles.cbu will get 'called-back' by Configure |