X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Flinux.sh;h=61d9fc8e5e0bfbd1c03a6b6473bd1b8f2a991cf0;hb=6137113dfd943e6f896f8b9c1a4df2b7d4e355ae;hp=caf380a5ab004118a2119ef09ea8858c3bb51619;hpb=f443a56e58e8d9278504f652b6b00ec642fed397;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/linux.sh b/hints/linux.sh index caf380a..61d9fc8 100644 --- a/hints/linux.sh +++ b/hints/linux.sh @@ -60,6 +60,11 @@ fi # function in . d_lstat=define +# malloc wrap works +case "$usemallocwrap" in +'') usemallocwrap='define' ;; +esac + # The system malloc() is about as fast and as frugal as perl's. # Since the system malloc() has been the default since at least # 5.001, we might as well leave it that way. --AD 10 Jan 2002 @@ -67,19 +72,29 @@ case "$usemymalloc" in '') usemymalloc='n' ;; esac +# Check if we're about to use Intel's ICC compiler +case "`${cc:-cc} -V 2>&1`" in +*"Intel(R) C++ Compiler"*) + # This is needed for Configure's prototype checks to work correctly + ccflags="-we147 $ccflags" + # If we're using ICC, we usually want the best performance + case "$optimize" in + '') optimize='-O3' ;; + esac + ;; +esac + case "$optimize" in -'') # If we have modern enough gcc and well-supported enough CPU, - # crank up the optimization level. - case "`${cc:-gcc} -v 2>&1`" in - *"gcc version 2.95"*|*"gcc version 3."*) - case "`arch 2>&1`" in - i?86|ppc) optimize='-O3' ;; - esac +# use -O2 by default ; -O3 doesn't seem to bring significant benefits with gcc +'') + optimize='-O2' + case "`uname -m`" in + ppc*) + # on ppc, it seems that gcc (at least gcc 3.3.2) isn't happy + # with -O2 ; so downgrade to -O1. + optimize='-O1' ;; esac - case "$optimize" in - '') optimize='-O2' ;; - esac ;; esac @@ -235,8 +250,8 @@ fi #'osfmach3ppc') ccdlflags='-Wl,-E' ;; #esac -case "`uname -r`" in -sparc-linux) +case "`uname -m`" in +sparc*) case "$cccdlflags" in *-fpic*) cccdlflags="`echo $cccdlflags|sed 's/-fpic/-fPIC/'`" ;; *) cccdlflags="$cccdlflags -fPIC" ;;