diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-08-18 09:11:01 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-08-18 09:12:38 +0800 |
commit | 8220ea6c49313bb1da40ba931e55a8162df21697 (patch) | |
tree | 538f9d183b5df5d9f31c53c633eaab40bff8ef0e | |
parent | 5d6296f55f5757d73139f203f4f0a1da89d9f4e9 (diff) |
mysql5: Fix the build with gcc4.5 by applying an upstream patch
Apply an upstream commit to get the build fixed with a gcc 4.5
-rw-r--r-- | recipes/mysql/mysql5-native_5.1.40.bb | 5 | ||||
-rw-r--r-- | recipes/mysql/mysql5/fix-abi-check-gcc45.patch | 77 | ||||
-rw-r--r-- | recipes/mysql/mysql5_5.1.40.inc | 3 |
3 files changed, 82 insertions, 3 deletions
diff --git a/recipes/mysql/mysql5-native_5.1.40.bb b/recipes/mysql/mysql5-native_5.1.40.bb index 6ad02011b7..6d102dde86 100644 --- a/recipes/mysql/mysql5-native_5.1.40.bb +++ b/recipes/mysql/mysql5-native_5.1.40.bb @@ -1,8 +1,9 @@ require mysql5_${PV}.inc inherit native -PR ="r0" +PR ="r1" -SRC_URI = "http://downloads.mysql.com/archives/mysql-5.1/mysql-${PV}.tar.gz" +SRC_URI = "http://downloads.mysql.com/archives/mysql-5.1/mysql-${PV}.tar.gz \ + file://fix-abi-check-gcc45.patch" RDEPENDS_${PN} = "" PACKAGES = "" diff --git a/recipes/mysql/mysql5/fix-abi-check-gcc45.patch b/recipes/mysql/mysql5/fix-abi-check-gcc45.patch new file mode 100644 index 0000000000..58812c1f1a --- /dev/null +++ b/recipes/mysql/mysql5/fix-abi-check-gcc45.patch @@ -0,0 +1,77 @@ +From: Date: July 20 2010 7:44pm +Subject: bzr commit into mysql-5.1-bugteam branch (davi:3493) Bug#52514 +List-Archive: http://lists.mysql.com/commits/113968 +X-Bug: 52514 +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="===============9147207462624717749==" + +--===============9147207462624717749== +MIME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Content-Disposition: inline + +# At a local mysql-5.1-bugteam repository of davi + + 3493 Davi Arnaut 2010-07-20 + Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5 + due to GCC preprocessor change + + The problem is that newer GCC versions treats missing headers + as fatal errors. The solution is to use a guard macro to prevent + the inclusion of system headers when checking the ABI with the + C Preprocessor. + + Reference: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15638 + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44836 + @ Makefile.am + Define guard macro. + @ configure.in + Remove workaround. + @ include/mysql.h + Guard the header inclusion. + @ include/mysql.h.pp + Header is not included anymore. + + modified: + Makefile.am + configure.in + include/mysql.h + include/mysql.h.pp +=== modified file 'Makefile.am' +Index: mysql-5.1.40/Makefile.am +=================================================================== +--- mysql-5.1.40.orig/Makefile.am 2009-10-07 01:46:13.000000000 +0800 ++++ mysql-5.1.40/Makefile.am 2010-08-17 20:07:24.843148001 +0800 +@@ -312,7 +312,7 @@ + do_abi_check: + set -ex; \ + for file in $(abi_headers); do \ +- @CC@ -E -nostdinc -dI \ ++ @CC@ -E -nostdinc -dI -DMYSQL_ABI_CHECK \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/include/mysql \ + -I$(top_srcdir)/sql \ +Index: mysql-5.1.40/include/mysql.h +=================================================================== +--- mysql-5.1.40.orig/include/mysql.h 2009-10-07 01:46:50.000000000 +0800 ++++ mysql-5.1.40/include/mysql.h 2010-08-17 20:07:24.843148001 +0800 +@@ -44,7 +44,9 @@ + #endif + + #ifndef _global_h /* If not standard header */ ++#ifndef MYSQL_ABI_CHECK + #include <sys/types.h> ++#endif + #ifdef __LCC__ + #include <winsock2.h> /* For windows */ + #endif +Index: mysql-5.1.40/include/mysql.h.pp +=================================================================== +--- mysql-5.1.40.orig/include/mysql.h.pp 2009-10-07 01:46:50.000000000 +0800 ++++ mysql-5.1.40/include/mysql.h.pp 2010-08-17 20:07:24.843148001 +0800 +@@ -1,4 +1,3 @@ +-#include <sys/types.h> + typedef char my_bool; + typedef int my_socket; + #include "mysql_version.h" diff --git a/recipes/mysql/mysql5_5.1.40.inc b/recipes/mysql/mysql5_5.1.40.inc index eb64fc1b43..363273f6a0 100644 --- a/recipes/mysql/mysql5_5.1.40.inc +++ b/recipes/mysql/mysql5_5.1.40.inc @@ -3,7 +3,7 @@ HOMEPAGE = "http://www.mysql.com/" SECTION = "libs" LICENSE = "GPL" DEPENDS = "ncurses" -PR = "r2" +PR = "r3" SRC_URI = "http://downloads.mysql.com/archives/mysql-5.1/mysql-${PV}.tar.gz \ file://configure.in.patch \ @@ -12,6 +12,7 @@ SRC_URI = "http://downloads.mysql.com/archives/mysql-5.1/mysql-${PV}.tar.gz \ file://Makefile.am.patch \ file://fix_host_path.patch \ file://configure-ps-cache-check.patch \ + file://fix-abi-check-gcc45.patch \ file://my.cnf \ file://mysqld.sh" |