diff options
Diffstat (limited to 'contrib/perl5/hints/irix_6.sh')
-rw-r--r-- | contrib/perl5/hints/irix_6.sh | 115 |
1 files changed, 68 insertions, 47 deletions
diff --git a/contrib/perl5/hints/irix_6.sh b/contrib/perl5/hints/irix_6.sh index 384701ffd6de..3250fc7d4a8a 100644 --- a/contrib/perl5/hints/irix_6.sh +++ b/contrib/perl5/hints/irix_6.sh @@ -53,11 +53,11 @@ case "$cc" in case "`$cc -version 2>&1`" in *7.0*) # Mongoose 7.0 ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1042,1048,1110,1116,1184 -OPT:Olimit=0" - optimize='none' + optimize='none' ;; *7.1*|*7.2|*7.20) # Mongoose 7.1+ ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -OPT:Olimit=0" - optimize='-O3' + optimize='-O3' # This is a temporary fix for 5.005. # Leave pp_ctl_cflags line at left margin for Configure. See # hints/README.hints, especially the section @@ -65,12 +65,12 @@ case "$cc" in pp_ctl_cflags='optimize=-O' ;; *7.*) # Mongoose 7.2.1+ - ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -OPT:Olimit=0:space=on" - optimize='-O3' + ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -OPT:Olimit=0:space=ON" + optimize='-O3' ;; *6.2*) # Ragnarok 6.2 ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184" - optimize='none' + optimize='none' ;; *) # Be safe and not optimize ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -OPT:Olimit=0" @@ -78,9 +78,30 @@ pp_ctl_cflags='optimize=-O' ;; esac - ld=ld +# this is to accommodate the 'modules' capability of the +# 7.2 MIPSPro compilers, which allows for the compilers to be installed +# in a nondefault location. Almost everything works as expected, but +# /usr/include isn't caught properly. Hence see the /usr/include/pthread.h +# change below to include TOOLROOT (a modules environment variable), +# and the following code. Additional +# code to accommodate the 'modules' environment should probably be added +# here if possible, or be inserted as a ${TOOLROOT} reference before +# absolute paths (again, see the pthread.h change below). +# -- krishna@sgi.com, 8/23/98 + +if [ "X${TOOLROOT}" != "X" ]; then +# we cant set cppflags because it gets overwritten +# we dont actually need $TOOLROOT/usr/include on the cc line cuz the +# modules functionality already includes it but +# XXX - how do I change cppflags in the hints file? + ccflags="$ccflags -I${TOOLROOT}/usr/include" + usrinc="${TOOLROOT}/usr/include" +fi + + ld=$cc # perl's malloc can return improperly aligned buffer - usemymalloc='undef' + # usemymalloc='undef' +malloc_cflags='ccflags="-DSTRICT_ALIGNMENT $ccflags"' # NOTE: -L/usr/lib32 -L/lib32 are automatically selected by the linker ldflags=' -L/usr/local/lib32 -L/usr/local/lib' cccdlflags=' ' @@ -138,22 +159,23 @@ set `echo X "$libswanted "|sed -e 's/ sun / /' -e 's/ crypt / /' -e 's/ bsd / /' shift libswanted="$*" -if [ "X$usethreads" = "X$define" -o "X$usethreads" = "Xy" ]; then - if test ! -f /usr/include/pthread.h -o ! -f /usr/lib/libpthread.so; then - uname_r=`uname -r` - case "`uname -r`" in - 5*|6.0|6.1) - echo >&4 "IRIX $uname_r does not have the POSIX threads." - echo >&4 "You should upgrade to at least IRIX 6.2 with pthread patches." - echo >&4 "Cannot continue, aborting." - exit 1 - ;; - 6.2) - echo >&4 "" -cat >&4 <<EOF -IRIX 6.2 $uname_r can have the POSIX threads. -The following IRIX patches (or their replacements) must, however, be installed: - +# 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]*) + if test ! -f ${TOOLROOT}/usr/include/pthread.h -o ! -f /usr/lib/libpthread.so; then + case "`uname -r`" in + [1-5].*|6.[01]) + cat >&4 <<EOM +IRIX `uname -r` does not support POSIX threads. +You should upgrade to at least IRIX 6.2 with pthread patches. +EOM + ;; + 6.2) + cat >&4 <<EOM +IRIX 6.2 can have the POSIX threads. +However, the following IRIX patches (or their replacements) MUST be installed: 1404 Irix 6.2 Posix 1003.1b man pages 1645 IRIX 6.2 & 6.3 POSIX header file updates 2000 Irix 6.2 Posix 1003.1b support modules @@ -163,28 +185,27 @@ IMPORTANT: Without patch 2401, a kernel bug in IRIX 6.2 will cause your machine to panic and crash when running threaded perl. IRIX 6.3 and up should be OK. - - +EOM + ;; + [67].*) + cat >&4 <<EOM +IRIX `uname -r` should have the POSIX threads. +But, somehow, you do not seem to have them installed. +EOM + ;; + esac + cat >&4 <<EOM Cannot continue, aborting. -EOF - exit 1 - ;; - 6.*|7.*) - echo >&4 "IRIX $uname_r should have the POSIX threads." - echo >&4 "But somehow you do not seem to have them installed." - echo >&4 "Cannot continue, aborting." - exit 1 - ;; - esac - unset uname_r - fi - # -lpthread needs to come before -lc but after other libraries such - # as -lgdbm and such like. We assume here that -lc is present in - # libswanted. If that fails to be true in future, then this can be - # changed to add pthread to the very end of libswanted. - set `echo X "$libswanted "| sed -e 's/ c / pthread /'` - ld="${cc:-cc}" - shift - libswanted="$*" - usemymalloc='n' -fi +EOM + exit 1 + fi + set `echo X "$libswanted "| sed -e 's/ c / pthread /'` + ld="${cc:-cc}" + shift + libswanted="$*" + + usemymalloc='n' + ;; +esac +EOCBU + |