List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:November 8 2011 2:34pm
Subject:bzr push into mysql-trunk branch (tor.didriksen:3575 to 3576) WL#5825
View as plain text  
 3576 Tor Didriksen	2011-11-08
      WL#5825 Using C++ Standard Library with MySQL code
      
      Post-push fix: scripts/mysql_config* must distinguish between cflags and cxxflags.

    modified:
      configure.cmake
      scripts/mysql_config.pl.in
      scripts/mysql_config.sh
 3575 Marko Mäkelä	2011-11-08 [merge]
      Merge mysql-5.5 to mysql-trunk.

    modified:
      storage/innobase/btr/btr0pcur.c
      storage/innobase/include/btr0pcur.h
      storage/innobase/include/btr0pcur.ic
=== modified file 'configure.cmake'
--- a/configure.cmake	2011-11-07 12:17:24 +0000
+++ b/configure.cmake	2011-11-08 14:33:41 +0000
@@ -110,6 +110,9 @@ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND
             DESTINATION ${INSTALL_LIBDIR} COMPONENT Development)
     # Using the $ORIGIN token with the -R option to locate the libraries
     # on a path relative to the executable:
+    # We need an extra backslash to pass $ORIGIN to the mysql_config script...
+    SET(QUOTED_CMAKE_CXX_LINK_FLAGS
+      "${CMAKE_CXX_LINK_FLAGS} -R'\\$ORIGIN/../lib' -R${STLPORT_PATH}")
     SET(CMAKE_CXX_LINK_FLAGS
       "${CMAKE_CXX_LINK_FLAGS} -R'\$ORIGIN/../lib' -R${STLPORT_PATH}")
     MESSAGE(STATUS "CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS}")

=== modified file 'scripts/mysql_config.pl.in'
--- a/scripts/mysql_config.pl.in	2011-06-30 15:50:45 +0000
+++ b/scripts/mysql_config.pl.in	2011-11-08 14:33:41 +0000
@@ -44,7 +44,6 @@ use strict;
 my @exclude_cflags =
   qw/DDBUG_OFF DSAFE_MUTEX DFORCE_INIT_OF_VARS
      DEXTRA_DEBUG DHAVE_purify O O[0-9] xO[0-9] W[-A-Za-z]*
-     Xa xstrconst xc99=none
      unroll2 ip mp restrict/;
 
 my @exclude_libs = qw/lmtmalloc static-libcxa i-static static-intel/;
@@ -205,11 +204,10 @@ $flags->{embedded_libs} =
 
 $flags->{include} = ["-I$pkgincludedir"];
 $flags->{cflags}  = [@{$flags->{include}},split(" ",'@CFLAGS@')];
+$flags->{cxxflags}= [@{$flags->{include}},split(" ",'@CXXFLAGS@')];
 
 # ----------------------------------------------------------------------
 # Remove some options that a client doesn't have to care about
-# FIXME until we have a --cxxflags, we need to remove -Xa
-#       and -xstrconst to make --cflags usable for Sun Forte C++
 # ----------------------------------------------------------------------
 
 my $filter = join("|", @exclude_cflags);
@@ -219,6 +217,12 @@ foreach my $cflag ( @tmp )
 {
   push(@{$flags->{cflags}}, $cflag) unless $cflag =~ m/^($filter)$/o;
 }
+@tmp = @{$flags->{cxxflags}};           # Copy the flag list
+$flags->{cxxflags} = [];                # Clear it
+foreach my $cxxflag ( @tmp )
+{
+  push(@{$flags->{cxxflags}}, $cxxflag) unless $cxxflag =~ m/^($filter)$/o;
+}
 
 # Same for --libs(_r)
 $filter = join("|", @exclude_libs);
@@ -234,6 +238,7 @@ foreach my $lib_type ( "libs","libs_r","
 
 my $include =       quote_options(@{$flags->{include}});
 my $cflags  =       quote_options(@{$flags->{cflags}});
+my $cxxflags=       quote_options(@{$flags->{cxxflags}});
 my $libs    =       quote_options(@{$flags->{libs}});
 my $libs_r  =       quote_options(@{$flags->{libs_r}});
 my $embedded_libs = quote_options(@{$flags->{embedded_libs}});
@@ -250,6 +255,7 @@ sub usage
 Usage: $0 [OPTIONS]
 Options:
         --cflags         [$cflags]
+        --cxxflags       [$cxxflags]
         --include        [$include]
         --libs           [$libs]
         --libs_r         [$libs_r]
@@ -271,6 +277,7 @@ EOF
 
 GetOptions(
            "cflags"  => sub { print "$cflags\n" },
+           "cxxflags"=> sub { print "$cxxflags\n" },
            "include" => sub { print "$include\n" },
            "libs"    => sub { print "$libs\n" },
            "libs_r"  => sub { print "$libs_r\n" },

=== modified file 'scripts/mysql_config.sh'
--- a/scripts/mysql_config.sh	2011-06-30 15:50:45 +0000
+++ b/scripts/mysql_config.sh	2011-11-08 14:33:41 +0000
@@ -114,6 +114,7 @@ libs=" $ldflags -L$pkglibdir -lmysqlclie
 libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ "
 libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @CLIENT_LIBS@ @openssl_libs@ "
 embedded_libs=" $ldflags -L$pkglibdir -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ "
+embedded_libs="$embedded_libs @QUOTED_CMAKE_CXX_LINK_FLAGS@"
 
 if [ -r "$pkglibdir/libmygcc.a" ]; then
   # When linking against the static library with a different version of GCC
@@ -126,24 +127,22 @@ if [ -r "$pkglibdir/libmygcc.a" ]; then
 fi
 
 cflags="-I$pkgincludedir @CFLAGS@ " #note: end space!
+cxxflags="-I$pkgincludedir @CXXFLAGS@ " #note: end space!
 include="-I$pkgincludedir"
 
 # Remove some options that a client doesn't have to care about
-# FIXME until we have a --cxxflags, we need to remove -Xa
-#       and -xstrconst to make --cflags usable for Sun Forte C++
-# FIXME until we have a --cxxflags, we need to remove -AC99
-#       to make --cflags usable for HP C++ (aCC)
 for remove in DDBUG_OFF DSAFE_MUTEX DFORCE_INIT_OF_VARS \
               DEXTRA_DEBUG DHAVE_purify O 'O[0-9]' 'xO[0-9]' 'W[-A-Za-z]*' \
               'mtune=[-A-Za-z0-9]*' 'mcpu=[-A-Za-z0-9]*' 'march=[-A-Za-z0-9]*' \
-              Xa xstrconst "xc99=none" AC99 \
               unroll2 ip mp restrict
 do
   # The first option we might strip will always have a space before it because
   # we set -I$pkgincludedir as the first option
   cflags=`echo "$cflags"|sed -e "s/ -$remove  */ /g"` 
+  cxxflags=`echo "$cxxflags"|sed -e "s/ -$remove  */ /g"` 
 done
 cflags=`echo "$cflags"|sed -e 's/ *\$//'` 
+cxxflags=`echo "$cxxflags"|sed -e 's/ *\$//'` 
 
 # Same for --libs(_r)
 for remove in lmtmalloc static-libcxa i-static static-intel
@@ -164,6 +163,7 @@ usage () {
 Usage: $0 [OPTIONS]
 Options:
         --cflags         [$cflags]
+        --cxxflags       [$cxxflags]
         --include        [$include]
         --libs           [$libs]
         --libs_r         [$libs_r]
@@ -185,6 +185,7 @@ if test $# -le 0; then usage; fi
 while test $# -gt 0; do
         case $1 in
         --cflags)  echo "$cflags" ;;
+        --cxxflags)echo "$cxxflags";;
         --include) echo "$include" ;;
         --libs)    echo "$libs" ;;
         --libs_r)  echo "$libs_r" ;;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (tor.didriksen:3575 to 3576) WL#5825Tor Didriksen11 Nov