X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/1973dd96bef9ac903e8ae60907e63e38e591ff1a..2823ea9b50ecf90078608b65b330273292d4304e:/hints/irix_6.sh diff --git a/hints/irix_6.sh b/hints/irix_6.sh index 51a4d75..e36d643 100644 --- a/hints/irix_6.sh +++ b/hints/irix_6.sh @@ -26,6 +26,8 @@ # 64-bitty by Jarkko Hietaniemi on 9/1998 +# Martin Pool added -shared for gcc on 2004-01-27 + # 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. @@ -39,6 +41,9 @@ # The compiler bug has been reported to SGI. # -- Allen Smith +# Modified (10/30/04) to turn off usemallocwrap (PERL_MALLOC_WRAP) in -n32 +# mode - Allen. + case "$use64bitall" in $define|true|[yY]*) case "`uname -s`" in @@ -138,7 +143,15 @@ esac' test -z "$lddlflags" && lddlflags="-n32 -shared" test -z "$libc" && libc='/usr/lib32/libc.so' test -z "$plibpth" && plibpth='/usr/lib32 /lib32 /usr/ccs/lib' - ;; + + # PERL_MALLOC_WRAP gives false alarms ("panic: memory wrap") in IRIX + # -n32 mode, resulting in perl compiles never getting further than + # miniperl. I am not sure whether it actually does any good in -32 or + # -64 mode, especially the latter, but it does not give false + # alarms (in testing). -Allen + + usemallocwrap=${usemallocwrap:-false} + ;; *"cc -64"*) case "`uname -s`" in IRIX) @@ -173,16 +186,21 @@ esac' ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME" test -z "$optimize" && optimize="-O3" usenm='undef' + # It seems gcc can build Irix shlibs, but of course it needs + # -shared. Otherwise you get link errors looking for main(). + lddlflags="$lddlflags -shared" 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 + # See http://groups.google.com/group/comp.sys.sgi.admin/msg/3ad8353bc4ce3cb0 # for more information. Reported by Lionel Cons . IRIX64) ccflags="$ccflags -mabi=64" ldflags="$ldflags -mabi=64 -L/usr/lib64" lddlflags="$lddlflags -mabi=64" ;; *) ccflags="$ccflags -DIRIX32_SEMUN_BROKEN_BY_GCC" + # XXX Note: It is possible that turning off usemallocwrap is + # needed here; insufficient data! - Allen ;; esac ;; @@ -319,6 +337,20 @@ case "`$cc -version 2>&1`" in ;; esac + +# Workaround [perl #33849]: perl 5.8.6 fails to build on IRIX 6.5 due to +# bizarre preprocessor bug: cc -E - unfortunately goes into K&R mode, but +# cc -E file.c doesn't. Force a wrapper to always get the ANSI mode. +# (We only need to do this for cc, not for gcc. ccversion is computed above.) +case "$ccversion" in +'') ;; # gcc. Do nothing. +*) # Inside this call-back unit, we are down in the UU/ subdirectory, + # but Configure will look for cppstdin one level up. + cd ..; cppstdin=`pwd`/cppstdin; cd UU + cpprun="$cppstdin" + ;; +esac + EOCCBU # End of cc.cbu callback unit. - Allen