X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Firix_6.sh;h=1b032cdb708d5a787ad6303182c3c9e6c5bde58f;hb=097ee67dff1c60f201bc09435bc6eaeeafcd8123;hp=a91be9807e2e142e182ee7c64f1d9dd1a2f8225b;hpb=9ea370a75330a8ebfe27730428b6c5793636dc59;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/irix_6.sh b/hints/irix_6.sh index a91be98..1b032cd 100644 --- a/hints/irix_6.sh +++ b/hints/irix_6.sh @@ -25,6 +25,8 @@ # gcc-enabled by Kurt Starsinic on 3/24/1998 +# 64-bitty by Jarkko Hietaniemi on 9/1998 + # Use sh Configure -Dcc='cc -n32' to try compiling with -n32. # or -Dcc='cc -n32 -mips3' (or -mips4) to force (non)portability # Don't bother with -n32 unless you have the 7.1 or later compilers. @@ -119,6 +121,13 @@ malloc_cflags='ccflags="-DSTRICT_ALIGNMENT $ccflags"' ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -D_POSIX_C_SOURCE" optimize="-O3" usenm='undef' + case "`uname -s`" in + # Without the -mabi=64 gcc in 64-bit IRIX has problems passing + # and returning small structures. This affects inet_*() and semctl(). + # See http://reality.sgi.com/ariel/freeware/gcc-2.8.1-notes.html + # for more information. Reported by Lionel Cons . + IRIX64) ccflags="$ccflags -mabi=64" ;; + esac ;; *) # this is needed to force the old-32 paths @@ -159,22 +168,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 ${TOOLROOT}/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 < 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 <&4 <&4 <&4 <&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 +EOM + exit 1 + fi + set `echo X "$libswanted "| sed -e 's/ c / pthread /'` + ld="${cc:-cc}" + shift + libswanted="$*" + + usemymalloc='n' + ;; +esac +EOCBU + +# This script UU/use64bits.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use 64 bits. +cat > UU/use64bits.cbu <<'EOCBU' +case "$use64bits" in +$define|true|[yY]*) + case "`uname -r`" in + [1-5]*|6.[01]) + cat >&4 <&2 + +You will see a *** WHOA THERE!!! *** message from Configure for +d_open64. Keep the recommended value. See hints/irix6.sh +for more information. + +EOM + ;; + esac + ccflags="$ccflags -DUSE_64_BIT_FILES" ;; - 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 +esac +EOCBU