Change 13342 by jhi@alpha on 2001/11/28 14:15:25

        In Linux if we have modern enough gcc and supported
        enough CPU, crank up the optimization level to -O3.

Affected files ...

.... //depot/perl/hints/linux.sh#30 edit

Differences ...

==== //depot/perl/hints/linux.sh#30 (text) ====
Index: perl/hints/linux.sh
--- perl/hints/linux.sh.~1~     Wed Nov 28 07:30:05 2001
+++ perl/hints/linux.sh Wed Nov 28 07:30:05 2001
@@ -97,7 +97,19 @@
 esac
 
 case "$optimize" in
-'') optimize='-O2' ;;
+'') # If we have modern enough gcc and well-supported enough CPU,
+    # crank up the optimization level.
+    case "`${cc:-gcc} -v 2>&1`" in
+    *gcc-2.95*|*gcc-3.*)
+        case "`arch 2>&1`" in
+        i?86|ppc) optimize='-O3' ;;
+        esac
+        ;;
+    esac
+    case "$optimize" in
+    '') optimize='-O2' ;;
+    esac
+    ;;
 esac
 
 # Are we using ELF?  Thanks to Kenneth Albanowski <[EMAIL PROTECTED]>
End of Patch.

Reply via email to