List:Commits« Previous MessageNext Message »
From:Alexey Kopytov Date:June 18 2009 12:47pm
Subject:bzr commit into mysql-5.0-bugteam branch (Alexey.Kopytov:2778)
Bug#41710
View as plain text  
#At file:///data/src/bzr/bugteam/bug41710/my50-bug41710/ based on revid:alexey.kopytov@stripped

 2778 Alexey Kopytov	2009-06-18
      Bug #41710: MySQL 5.1.30 crashes on the latest OpenSolaris 10 
       
      Change the default optimization level for Sun Studio to "-O1". 
      This is a workaround for a Sun Studio bug (see bug #41710 
      comments for details): 
       
      1. Use $GCC instead of $ac_cv_prog_gcc to check for gcc, since 
      the first one is the only documented way to do it. 
       
      2. Use $GXX instead of $ac_cv_prog_cxx_g to check for g++, 
      since the latter is set to "yes" when the C++ compiler accepts 
      "-g" which is the case for both g++ and CC. 
       
      3. When building with Sun Studio, set the default values for 
      CFLAGS/CXXFLAGS to "-O1", since unlike GCC, Sun Studio 
      interprets "-O" as "-xO3" (see the manual pages for cc and CC). 
     @ configure.in
        1. Use $GCC instead of $ac_cv_prog_gcc to check for gcc, since 
        the first one is the only documented way to do it. 
         
        2. Use $GXX instead of $ac_cv_prog_cxx_g to check for g++, 
        since the latter is set to "yes" when the C++ compiler accepts 
        "-g" which is the case for both g++ and CC. 
         
        3. When building with Sun Studio, set the default values for 
        CFLAGS/CXXFLAGS to "-O1", since unlike GCC, Sun Studio 
        interprets "-O" as "-xO3" (see the manual pages for cc and CC).

    modified:
      configure.in
=== modified file 'configure.in'
--- a/configure.in	2009-06-11 11:49:04 +0000
+++ b/configure.in	2009-06-18 12:47:45 +0000
@@ -1756,7 +1756,7 @@ esac
 
 # Build optimized or debug version ?
 # First check for gcc and g++
-if test "$ac_cv_prog_gcc" = "yes"
+if test "$GCC" = "yes"
 then
   DEBUG_CFLAGS="-g"
   DEBUG_OPTIMIZE_CC="-O"
@@ -1764,7 +1764,14 @@ then
 else
   DEBUG_CFLAGS="-g"
   DEBUG_OPTIMIZE_CC=""
-  OPTIMIZE_CFLAGS="-O"
+  case $SYSTEM_TYPE in                               
+    *solaris*)
+      OPTIMIZE_CFLAGS="-O1"
+      ;;
+    *)
+      OPTIMIZE_CFLAGS="-O"
+      ;;
+  esac
 fi
 if test "$ac_cv_prog_cxx_g" = "yes"
 then
@@ -1774,7 +1781,14 @@ then
 else
   DEBUG_CXXFLAGS="-g"
   DEBUG_OPTIMIZE_CXX=""
-  OPTIMIZE_CXXFLAGS="-O"
+  case $SYSTEM_TYPE in
+    *solaris*)
+      OPTIMIZE_CXXFLAGS="-O1"
+      ;;
+    *)
+      OPTIMIZE_CXXFLAGS="-O"
+      ;;
+  esac
 fi
 
 if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null; then


Attachment: [text/bzr-bundle] bzr/alexey.kopytov@sun.com-20090618124745-2u3gxc0q2345jb5v.bundle
Thread
bzr commit into mysql-5.0-bugteam branch (Alexey.Kopytov:2778)Bug#41710Alexey Kopytov18 Jun