Commit e90c70ce authored by vasil's avatar vasil

branches/5.1:

* Use INNODB_CFLAGS insead of cluttering CFLAGS with InnoDB specific
  flags. CFLAGS are used to compile every file in the MySQL source tree.

* Add INNODB_DYNAMIC_CFLAGS to the flags of the dynamic plugin and use
  -prefer-non-pic to make the dynamic plugin faster on i386.

Approved by:	Sunny
parent 16a019dc
......@@ -154,15 +154,15 @@ libinnobase_a_SOURCES = btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c \
ut/ut0ut.c ut/ut0vec.c ut/ut0wqueue.c \
handler/ha_innodb.cc
libinnobase_a_CXXFLAGS= $(AM_CFLAGS)
libinnobase_a_CFLAGS = $(AM_CFLAGS)
libinnobase_a_CXXFLAGS= $(AM_CFLAGS) $(INNODB_CFLAGS)
libinnobase_a_CFLAGS = $(AM_CFLAGS) $(INNODB_CFLAGS)
EXTRA_LTLIBRARIES = ha_innodb.la
pkglib_LTLIBRARIES = @plugin_innobase_shared_target@
ha_innodb_la_LDFLAGS = -module -rpath $(MYSQLLIBdir)
ha_innodb_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_innodb_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_innodb_la_CXXFLAGS= $(AM_CFLAGS) $(INNODB_CFLAGS) $(INNODB_DYNAMIC_CFLAGS)
ha_innodb_la_CFLAGS = $(AM_CFLAGS) $(INNODB_CFLAGS) $(INNODB_DYNAMIC_CFLAGS)
ha_innodb_la_SOURCES = $(libinnobase_a_SOURCES)
EXTRA_DIST = CMakeLists.txt plug.in \
......
......@@ -16,24 +16,29 @@ MYSQL_PLUGIN_ACTIONS(innobase, [
AC_C_BIGENDIAN
case "$target_os" in
lin*)
CFLAGS="$CFLAGS -DUNIV_LINUX";;
INNODB_CFLAGS="-DUNIV_LINUX";;
hpux10*)
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX -DUNIV_HPUX10";;
INNODB_CFLAGS="-DUNIV_MUST_NOT_INLINE -DUNIV_HPUX -DUNIV_HPUX10";;
hp*)
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX";;
INNODB_CFLAGS="-DUNIV_MUST_NOT_INLINE -DUNIV_HPUX";;
aix*)
CFLAGS="$CFLAGS -DUNIV_AIX";;
irix*)
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
osf*)
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
*solaris*|*SunOS*)
CFLAGS="$CFLAGS -DUNIV_SOLARIS";;
sysv5uw7*)
# Problem when linking on SCO
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
openbsd*)
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
INNODB_CFLAGS="-DUNIV_AIX";;
irix*|osf*|sysv5uw7*|openbsd*)
INNODB_CFLAGS="-DUNIV_MUST_NOT_INLINE";;
*solaris*|*SunOS*)
INNODB_CFLAGS="-DUNIV_SOLARIS";;
esac
INNODB_DYNAMIC_CFLAGS="-DMYSQL_DYNAMIC_PLUGIN"
case "$target_cpu" in
x86_64)
# The AMD64 ABI forbids absolute addresses in shared libraries
;;
*86)
# Use absolute addresses on IA-32
INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
;;
esac
AC_SUBST(INNODB_CFLAGS)
AC_SUBST(INNODB_DYNAMIC_CFLAGS)
])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment