aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data/cc
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-07 19:04:11 +0000
committerlloyd <[email protected]>2010-09-07 19:04:11 +0000
commitbd7c90c4cb9691848e2edaf4bb185146417538c2 (patch)
tree37ac56345c9f2d71a6007b746315a2443044b278 /src/build-data/cc
parentc574bbeb6c41b68ca19a09a628cf69dcef3dd5ba (diff)
Update CPU optimization flags for Sun Studio to the previous decade.
Also use -xO5 instead of -xO2; everything seems to work under -xO5 on x86-32 and x86-64 with my version of Sun Studio. Curiously, several things are miscompiled with -xO2! Definitely doesn't give me positive feelings about this optimizer.
Diffstat (limited to 'src/build-data/cc')
-rw-r--r--src/build-data/cc/sunstudio.txt16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/build-data/cc/sunstudio.txt b/src/build-data/cc/sunstudio.txt
index 987f85e67..adb015484 100644
--- a/src/build-data/cc/sunstudio.txt
+++ b/src/build-data/cc/sunstudio.txt
@@ -8,15 +8,13 @@ add_include_dir_option -I
add_lib_dir_option -L
add_lib_option -l
-# The compiler supports up to -xO5, but anything higher than -xO2 causes
-# incorrect results, infinite loops, other badness. :(
-lib_opt_flags "-xO2"
+lib_opt_flags "-xO5"
check_opt_flags "-xO2"
debug_flags -g
no_debug_flags ""
shared_flags "-KPIC"
warning_flags "+w"
-lang_flags "+p -D__EXTENSIONS__"
+lang_flags "+p -features=extensions -D__FUNCTION__=__func__"
ar_command "CC -xar -o"
@@ -30,9 +28,15 @@ default -> "$(CXX) -G -h$(SONAME)"
i386 -> "-xtarget=486"
i486 -> "-xtarget=486"
i586 -> "-xtarget=pentium"
-i686 -> "-xtarget=pentium_pro"
-pentium4 -> "-xtarget=pentium_pro"
k6 -> "-xtarget=pentium"
+i686 -> "-xtarget=pentium_pro"
+
+pentium3 -> "-xtarget=pentium3"
+pentium4 -> "-xtarget=pentium4"
+
+core2 -> "-xtarget=core2"
+opteron -> "-xtarget=opteron"
+nehalem -> "-xtarget=nehalem"
sparc32-v9 -> "-xchip=ultra -xarch=v8"