forked from pool/mariadb
Accepting request 76337 from home:elvigia:branches:server:database
- Fix strict-aliasing warnings - allow using the "pool of threads" feature that requires libevent OBS-URL: https://build.opensuse.org/request/show/76337 OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=46
This commit is contained in:
parent
0a0e43f97f
commit
0fc42a3fb2
@ -8,7 +8,7 @@ export WARN_DIS=" -Wno-unused-parameter "
|
|||||||
%if 0%{?suse_version} > 1140
|
%if 0%{?suse_version} > 1140
|
||||||
export WARN_DIS="$WARN_DIS -Wno-unused-but-set-variable "
|
export WARN_DIS="$WARN_DIS -Wno-unused-but-set-variable "
|
||||||
%endif
|
%endif
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -DFORCE_INIT_OF_VARS -fno-strict-aliasing $WARN_DIS"
|
export CFLAGS="$RPM_OPT_FLAGS -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -DFORCE_INIT_OF_VARS $WARN_DIS"
|
||||||
export CXXFLAGS="$CFLAGS -fno-exceptions -fno-rtti"
|
export CXXFLAGS="$CFLAGS -fno-exceptions -fno-rtti"
|
||||||
# Make the compile a function, since we do multiple builds
|
# Make the compile a function, since we do multiple builds
|
||||||
BuildMySQL() {
|
BuildMySQL() {
|
||||||
@ -18,6 +18,7 @@ BuildMySQL() {
|
|||||||
mkdir _build$suffix
|
mkdir _build$suffix
|
||||||
pushd _build$suffix
|
pushd _build$suffix
|
||||||
../configure \
|
../configure \
|
||||||
|
--with-libevent \
|
||||||
--enable-assembler \
|
--enable-assembler \
|
||||||
--without-readline \
|
--without-readline \
|
||||||
--infodir=%{_infodir} \
|
--infodir=%{_infodir} \
|
||||||
|
74
mariadb-strict-aliasing.patch
Normal file
74
mariadb-strict-aliasing.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
--- storage/pbxt/src/Makefile.am.orig
|
||||||
|
+++ storage/pbxt/src/Makefile.am
|
||||||
|
@@ -40,17 +40,19 @@ libpbxt_la_SOURCES = $(non_mysql_interna
|
||||||
|
# These are the warning Drizzle uses:
|
||||||
|
# DRIZZLE_WARNINGS = -W -Wall -Wextra -pedantic -Wundef -Wredundant-decls -Wno-strict-aliasing -Wno-long-long -Wno-unused-parameter
|
||||||
|
|
||||||
|
-libpbxt_la_CXXFLAGS = -shared $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN
|
||||||
|
-libpbxt_la_CFLAGS = -shared $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN -std=c99
|
||||||
|
+libpbxt_la_CXXFLAGS = -shared $(AM_CXXFLAGS) -fno-strict-aliasing -DMYSQL_DYNAMIC_PLUGIN
|
||||||
|
+libpbxt_la_CFLAGS = -shared $(AM_CFLAGS) -fno-strict-aliasing -DMYSQL_DYNAMIC_PLUGIN -std=c99
|
||||||
|
libpbxt_la_LDFLAGS = -module
|
||||||
|
|
||||||
|
noinst_LTLIBRARIES = libpbxt_s.la libpbxt_s_embedded.la libpbxt_s_common.la
|
||||||
|
|
||||||
|
libpbxt_s_common_la_SOURCES = $(non_mysql_internal_sources)
|
||||||
|
+libpbxt_s_common_la_CXXFLAGS = $(AM_CXXFLAGS) -fno-strict-aliasing
|
||||||
|
libpbxt_s_la_SOURCES = $(mysql_internal_sources)
|
||||||
|
+libpbxt_s_la_CXXFLAGS = $(AM_CXXFLAGS) -fno-strict-aliasing
|
||||||
|
libpbxt_s_la_LIBADD = libpbxt_s_common.la
|
||||||
|
libpbxt_s_embedded_la_SOURCES = $(mysql_internal_sources)
|
||||||
|
-libpbxt_s_embedded_la_CXXFLAGS = $(AM_CXXFLAGS) @plugin_embedded_defs@
|
||||||
|
+libpbxt_s_embedded_la_CXXFLAGS = $(AM_CXXFLAGS) -fno-strict-aliasing @plugin_embedded_defs@
|
||||||
|
libpbxt_s_embedded_la_LIBADD = libpbxt_s_common.la
|
||||||
|
|
||||||
|
EXTRA_DIST = pbms_enabled.cc win_inttypes.h
|
||||||
|
--- storage/innodb_plugin/buf/buf0flu.c.orig
|
||||||
|
+++ storage/innodb_plugin/buf/buf0flu.c
|
||||||
|
@@ -112,7 +112,9 @@ buf_flush_insert_in_flush_rbt(
|
||||||
|
p_node = rbt_prev(buf_pool->flush_rbt, c_node);
|
||||||
|
|
||||||
|
if (p_node != NULL) {
|
||||||
|
- prev = *rbt_value(buf_page_t*, p_node);
|
||||||
|
+ buf_page_t** value;
|
||||||
|
+ value = rbt_value(buf_page_t*, p_node);
|
||||||
|
+ prev = *value;
|
||||||
|
ut_a(prev != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
--- storage/sphinx/Makefile.am.orig
|
||||||
|
+++ storage/sphinx/Makefile.am
|
||||||
|
@@ -35,17 +35,17 @@ pkgplugin_LTLIBRARIES = @plugin_sphinx_s
|
||||||
|
|
||||||
|
ha_sphinx_la_LDFLAGS = -module -avoid-version -rpath $(MYSQLLIBdir) \
|
||||||
|
-L$(top_builddir)/libservices -lmysqlservices
|
||||||
|
-ha_sphinx_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN
|
||||||
|
+ha_sphinx_la_CXXFLAGS= $(AM_CXXFLAGS) -fno-strict-aliasing -DMYSQL_DYNAMIC_PLUGIN
|
||||||
|
ha_sphinx_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
|
||||||
|
ha_sphinx_la_SOURCES = ha_sphinx.cc
|
||||||
|
|
||||||
|
sphinx_la_LDFLAGS = -module -avoid-version
|
||||||
|
-sphinx_la_CXXFLAGS = $(AM_CXXFLAGS)
|
||||||
|
+sphinx_la_CXXFLAGS = $(AM_CXXFLAGS) -fno-strict-aliasing
|
||||||
|
sphinx_la_CFLAGS = $(AM_CFLAGS)
|
||||||
|
sphinx_la_SOURCES = snippets_udf.cc
|
||||||
|
|
||||||
|
noinst_LTLIBRARIES = @plugin_sphinx_static_target@
|
||||||
|
-libsphinx_la_CXXFLAGS = $(AM_CXXFLAGS)
|
||||||
|
+libsphinx_la_CXXFLAGS = $(AM_CXXFLAGS) -fno-strict-aliasing
|
||||||
|
libsphinx_la_CFLAGS = $(AM_CFLAGS)
|
||||||
|
libsphinx_la_SOURCES= ha_sphinx.cc
|
||||||
|
|
||||||
|
--- storage/xtradb/buf/buf0flu.c.orig
|
||||||
|
+++ storage/xtradb/buf/buf0flu.c
|
||||||
|
@@ -113,7 +113,9 @@ buf_flush_insert_in_flush_rbt(
|
||||||
|
p_node = rbt_prev(buf_pool->flush_rbt, c_node);
|
||||||
|
|
||||||
|
if (p_node != NULL) {
|
||||||
|
- prev = *rbt_value(buf_page_t*, p_node);
|
||||||
|
+ buf_page_t** value;
|
||||||
|
+ value = rbt_value(buf_page_t*, p_node);
|
||||||
|
+ prev = *value;
|
||||||
|
ut_a(prev != NULL);
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jul 16 23:14:42 UTC 2011 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
- Fix strict-aliasing warnings
|
||||||
|
- allow using the "pool of threads" feature that requires libevent
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 22 19:19:50 CEST 2011 - mhrusecky@suse.cz
|
Wed Jun 22 19:19:50 CEST 2011 - mhrusecky@suse.cz
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ PreReq: %install_info_prereq %insserv_prereq
|
|||||||
%endif
|
%endif
|
||||||
BuildRequires: gcc-c++ ncurses-devel openssl-devel procps readline-devel zlib-devel
|
BuildRequires: gcc-c++ ncurses-devel openssl-devel procps readline-devel zlib-devel
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
BuildRequires: pwdutils tcpd-devel
|
BuildRequires: pwdutils tcpd-devel libevent-devel
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?suse_version} > 1030 || 0%{?fedora_version} > 8
|
%if 0%{?suse_version} > 1030 || 0%{?fedora_version} > 8
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -79,7 +79,7 @@ Requires: %{name}-client perl-base
|
|||||||
Provides: mysql-Max = %{srv_vers}
|
Provides: mysql-Max = %{srv_vers}
|
||||||
Provides: mysql = %{srv_vers}
|
Provides: mysql = %{srv_vers}
|
||||||
Conflicts: otherproviders(mysql)
|
Conflicts: otherproviders(mysql)
|
||||||
|
Patch1: mariadb-strict-aliasing.patch
|
||||||
%description
|
%description
|
||||||
MariaDB is a backward compatible, drop-in replacement branch of the MySQL
|
MariaDB is a backward compatible, drop-in replacement branch of the MySQL
|
||||||
Database Server. It includes all major open source storage engines, including
|
Database Server. It includes all major open source storage engines, including
|
||||||
@ -407,6 +407,7 @@ for i in `grep -Rl mysqlclient .`; do
|
|||||||
sed -i 's|mysqlclient|mariadbclient|g' $i
|
sed -i 's|mysqlclient|mariadbclient|g' $i
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
|
%patch1
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
%build
|
%build
|
||||||
|
Loading…
Reference in New Issue
Block a user