Commit 072fa90d authored by unknown's avatar unknown
Browse files

BUG#9714 libsupc++ problem

 - Remove linking of libsupc++
 - Move all local static variables to filescope


configure.in:
  Remove linking with libsupc++
sql/examples/ha_archive.cc:
  Move local static variables to file scope
sql/examples/ha_example.cc:
  Move local static variables to file scope
sql/examples/ha_tina.cc:
  Move local static variables to file scope
sql/ha_berkeley.cc:
  Move local static variables to file scope
sql/ha_blackhole.cc:
  Move local static variables to file scope
sql/ha_federated.cc:
  Move local static variables to file scope
sql/ha_heap.cc:
  Move local static variables to file scope
sql/ha_innodb.cc:
  Move local static variables to file scope
sql/ha_myisam.cc:
  Move local static variables to file scope
sql/ha_myisammrg.cc:
  Move local static variables to file scope
sql/ha_ndbcluster.cc:
  Move local static variables to file scope
sql/item.cc:
  Move local static instance variables to file scope
sql/item_sum.cc:
  Move local static variables to file scope
parent 9e7028c8
Loading
Loading
Loading
Loading
+9 −29
Original line number Diff line number Diff line
@@ -336,7 +336,7 @@ AC_SUBST(LD)
AC_SUBST(INSTALL_SCRIPT)

export CC CXX CFLAGS LD LDFLAGS AR

echo "GXX: $GXX"
if test "$GXX" = "yes"
then
  # mysqld requires -fno-implicit-templates.
@@ -344,36 +344,16 @@ then
  # mysqld doesn't use run-time-type-checking, so we disable it.
  CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti"

  #CXX_VERNO=`echo $CXX_VERSION | sed -e 's/[[^0-9. ]]//g; s/^ *//g; s/ .*//g'`
  echo "CXX: $CXX"
  if echo $CXX | grep gcc > /dev/null 2>&1
  then
    echo "Setting CXXFLAGS"
    # If you are using 'gcc' 3.0 (not g++) to compile C++ programs on Linux,
    # we will gets some problems when linking static programs.
    # The following code is used to fix this problem.

  if echo $CXX | grep gcc > /dev/null 2>&1
  then
    GCC_VERSION=`gcc -v 2>&1 | grep version | sed -e 's/[[^0-9. ]]//g; s/^ *//g; s/ .*//g'`
    case $SYSTEM_TYPE in
      *freebsd*)
        # The libsupc++ library on freebsd with gcc 3.4.2 is dependent on 
        # libstdc++, disable it  since other solution works fine
        GCC_VERSION="NOSUPCPP_$GCC_VERSION"
      ;;
      *) 
      ;;
    esac
    echo "Using gcc version '$GCC_VERSION'"
    case "$GCC_VERSION" in
      3.4.*|3.5.*)
        # Statically link the language support function's found in libsupc++.a
        LIBS="$LIBS -lsupc++"
	echo "Using -libsupc++ for static linking with gcc"
      ;;
      *)
        # Using -lsupc++ doesn't work in gcc 3.3 on SuSE 9.2
        # (causes link failures when linking things staticly)
    CXXFLAGS="$CXXFLAGS -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL"
    echo "Using MYSYS_NEW for static linking with gcc"
      ;;
    esac
  fi
fi

+11 −2
Original line number Diff line number Diff line
@@ -434,8 +434,17 @@ int ha_archive::free_share(ARCHIVE_SHARE *share)
/*
  We just implement one additional file extension.
*/
static const char *ha_archive_exts[] = {
  ARZ,
  ARN,
  ARM,
  NullS
};

const char **ha_archive::bas_ext() const
{ static const char *ext[]= { ARZ, ARN, ARM, NullS }; return ext; }
{
  return ha_archive_exts;
}


/* 
+7 −1
Original line number Diff line number Diff line
@@ -186,8 +186,14 @@ static int free_share(EXAMPLE_SHARE *share)
  exist for the storage engine. This is also used by the default rename_table and
  delete_table method in handler.cc.
*/
static const char *ha_example_exts[] = {
  NullS
};

const char **ha_example::bas_ext() const
{ static const char *ext[]= { NullS }; return ext; }
{
  return ha_example_exts;
}


/*
+8 −1
Original line number Diff line number Diff line
@@ -384,8 +384,15 @@ int ha_tina::find_current_row(byte *buf)
  If frm_error() is called in table.cc this is called to find out what file
  extensions exist for this handler.
*/
static const char *ha_tina_exts[] = {
  ".CSV",
  NullS
};

const char **ha_tina::bas_ext() const
{ static const char *ext[]= { ".CSV", NullS }; return ext; }
{
  return ha_tina_exts;
}


/* 
+7 −2
Original line number Diff line number Diff line
@@ -371,10 +371,15 @@ void berkeley_cleanup_log_files(void)
/*****************************************************************************
** Berkeley DB tables
*****************************************************************************/
static const char *ha_berkeley_exts[] = {
  ha_berkeley_ext,
  NullS
};

const char **ha_berkeley::bas_ext() const
{ static const char *ext[]= { ha_berkeley_ext, NullS }; return ext; }

{
  return ha_berkeley_exts;
}

ulong ha_berkeley::index_flags(uint idx, uint part, bool all_parts) const
{
Loading