summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2009-06-18 17:11:47 +0400
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2009-06-18 17:11:47 +0400
commite544285dc2182eb9f6da7a77d2730747a87a2e69 (patch)
tree220a6c19bc9166e1da09392b30c06b16de322057 /configure.in
parent8d595065020b17ffb9c6528a94d2cd8686d9b22e (diff)
downloadmariadb-git-e544285dc2182eb9f6da7a77d2730747a87a2e69.tar.gz
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).
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in22
1 files changed, 18 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index 4fcb1f13f35..ec432e19ce3 100644
--- a/configure.in
+++ b/configure.in
@@ -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,9 +1764,16 @@ 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"
+if test "$GXX" = "yes"
then
DEBUG_CXXFLAGS="-g"
DEBUG_OPTIMIZE_CXX="-O"
@@ -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