From bd7c90c4cb9691848e2edaf4bb185146417538c2 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 7 Sep 2010 19:04:11 +0000 Subject: 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. --- src/build-data/cc/sunstudio.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/build-data/cc') 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" -- cgit v1.2.3