X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Firix_6.sh;h=1b032cdb708d5a787ad6303182c3c9e6c5bde58f;hb=097ee67dff1c60f201bc09435bc6eaeeafcd8123;hp=c19dd05d84d4b0b55dbb43398ad71a3a0bf7e992;hpb=3c8a44569607336e4bea79da62162b3ded82557b;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/irix_6.sh b/hints/irix_6.sh index c19dd05..1b032cd 100644 --- a/hints/irix_6.sh +++ b/hints/irix_6.sh @@ -121,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 @@ -161,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 - ;; - 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 - -# 64-bitness. -# jhi@iki.fi, inspired by Scott Henry. - -if [ "X$use64bits" = "X$define" ]; then - uname_r=`uname -r` - case "$uname_r" in - [1-5]*|6.[01]) - echo >&4 "IRIX $uname_r does not support 64-bit types." - echo >&4 "You should upgrade to at least IRIX 6.2." - exit 1 +EOM + exit 1 + fi + set `echo X "$libswanted "| sed -e 's/ c / pthread /'` + ld="${cc:-cc}" + shift + libswanted="$*" + + usemymalloc='n' ;; - esac - case "$ccflags" in - *-n32*) - ccflags="$ccflags -DUSE_LONG_LONG" - ;; - esac - ccflags="$ccflags -DUSE_64_BIT_FILES -DNO_OPEN64" -fi +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 +EOCBU