1 |
commit: e8c0eadaaec5c5160cff4d8ecc7130f05dd7e39f |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 30 19:32:16 2015 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 30 19:32:16 2015 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=e8c0eada |
7 |
|
8 |
Attempt to fix bug 508724 by forcing ld.bfd |
9 |
|
10 |
--- |
11 |
eclass/mysql-multilib.eclass | 82 ++++++++++++++++++++++++++------------------ |
12 |
1 file changed, 49 insertions(+), 33 deletions(-) |
13 |
|
14 |
diff --git a/eclass/mysql-multilib.eclass b/eclass/mysql-multilib.eclass |
15 |
index dc07df7..1749cb2 100644 |
16 |
--- a/eclass/mysql-multilib.eclass |
17 |
+++ b/eclass/mysql-multilib.eclass |
18 |
@@ -39,7 +39,7 @@ case "${EAPI:-0}" in |
19 |
*) die "Unsupported EAPI: ${EAPI}" ;; |
20 |
esac |
21 |
|
22 |
-EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_config |
23 |
+EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_config |
24 |
|
25 |
# |
26 |
# VARIABLES: |
27 |
@@ -410,6 +410,31 @@ mysql-multilib_disable_test() { |
28 |
# EBUILD FUNCTIONS |
29 |
# |
30 |
|
31 |
+# @FUNCTION: mysql-multilib_pkg_pretend |
32 |
+# @DESCRIPTION: |
33 |
+# Perform some basic tests and tasks during pkg_pretend phase: |
34 |
+mysql-multilib_pkg_pretend() { |
35 |
+ if [[ ${MERGE_TYPE} != binary ]] ; then |
36 |
+ # Bug 508724 |
37 |
+ if [[ ${PN} == 'mariadb' || ${PN} == 'mariadb-galera' ]] && \ |
38 |
+ test-flags-CC -fuse-ld=bfd > /dev/null && |
39 |
+ $(tc-getLD) --version | grep -q "GNU gold"; then |
40 |
+ eerror "MariaDB will not build with the gold linker." |
41 |
+ eerror "Please select the bfd linker with binutils-config." |
42 |
+ die "GNU gold detected" |
43 |
+ fi |
44 |
+ if use_if_iuse tokudb && [[ $(gcc-major-version) -lt 4 || \ |
45 |
+ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]] ; then |
46 |
+ eerror "${PN} with tokudb needs to be built with gcc-4.7 or later." |
47 |
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version." |
48 |
+ die |
49 |
+ fi |
50 |
+ fi |
51 |
+ if use cluster && [[ "${PN}" != "mysql-cluster" ]]; then |
52 |
+ die "NDB Cluster support has been removed from all packages except mysql-cluster" |
53 |
+ fi |
54 |
+} |
55 |
+ |
56 |
# @FUNCTION: mysql-multilib_pkg_setup |
57 |
# @DESCRIPTION: |
58 |
# Perform some basic tests and tasks during pkg_setup phase: |
59 |
@@ -430,23 +455,9 @@ mysql-multilib_pkg_setup() { |
60 |
enewgroup mysql 60 || die "problem adding 'mysql' group" |
61 |
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" |
62 |
|
63 |
- if use cluster && [[ "${PN}" != "mysql-cluster" ]]; then |
64 |
- ewarn "Upstream has noted that the NDB cluster support in the 5.0 and" |
65 |
- ewarn "5.1 series should NOT be put into production. In the near" |
66 |
- ewarn "future, it will be disabled from building." |
67 |
- fi |
68 |
- |
69 |
if [[ ${PN} == "mysql-cluster" ]] ; then |
70 |
mysql_version_is_at_least "7.2.9" && java-pkg-opt-2_pkg_setup |
71 |
fi |
72 |
- |
73 |
- if use_if_iuse tokudb && [[ "${MERGE_TYPE}" != "binary" && $(gcc-major-version) -lt 4 || \ |
74 |
- $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]] ; then |
75 |
- eerror "${PN} with tokudb needs to be built with gcc-4.7 or later." |
76 |
- eerror "Please use gcc-config to switch to gcc-4.7 or later version." |
77 |
- die |
78 |
- fi |
79 |
- |
80 |
} |
81 |
|
82 |
# @FUNCTION: mysql-multilib_src_unpack |
83 |
@@ -479,6 +490,29 @@ mysql-multilib_src_prepare() { |
84 |
# @DESCRIPTION: |
85 |
# Configure mysql to build the code for Gentoo respecting the use flags. |
86 |
mysql-multilib_src_configure() { |
87 |
+ # Bug #114895, bug #110149 |
88 |
+ filter-flags "-O" "-O[01]" |
89 |
+ |
90 |
+ CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" |
91 |
+ CXXFLAGS="${CXXFLAGS} -felide-constructors" |
92 |
+ # Causes linkage failures. Upstream bug #59607 removes it |
93 |
+ if ! mysql_version_is_at_least "5.6" ; then |
94 |
+ CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" |
95 |
+ fi |
96 |
+ # As of 5.7, exceptions are used! |
97 |
+ if ! mysql_version_is_at_least "5.7" ; then |
98 |
+ CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-rtti" |
99 |
+ fi |
100 |
+ export CXXFLAGS |
101 |
+ |
102 |
+ # bug #283926, with GCC4.4, this is required to get correct behavior. |
103 |
+ append-flags -fno-strict-aliasing |
104 |
+ |
105 |
+ # bug 508724 mariadb cannot use ld.gold |
106 |
+ if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then |
107 |
+ append-ldflags $(test-flags-CXX -fuse-ld=bfd) |
108 |
+ fi |
109 |
+ |
110 |
multilib-minimal_src_configure |
111 |
} |
112 |
|
113 |
@@ -558,24 +592,6 @@ multilib_src_configure() { |
114 |
configure_cmake_minimal |
115 |
fi |
116 |
|
117 |
- # Bug #114895, bug #110149 |
118 |
- filter-flags "-O" "-O[01]" |
119 |
- |
120 |
- CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" |
121 |
- CXXFLAGS="${CXXFLAGS} -felide-constructors" |
122 |
- # Causes linkage failures. Upstream bug #59607 removes it |
123 |
- if ! mysql_version_is_at_least "5.6" ; then |
124 |
- CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" |
125 |
- fi |
126 |
- # As of 5.7, exceptions are used! |
127 |
- if ! mysql_version_is_at_least "5.7" ; then |
128 |
- CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-rtti" |
129 |
- fi |
130 |
- export CXXFLAGS |
131 |
- |
132 |
- # bug #283926, with GCC4.4, this is required to get correct behavior. |
133 |
- append-flags -fno-strict-aliasing |
134 |
- |
135 |
cmake-utils_src_configure |
136 |
} |