From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8AD1C138A1A for ; Fri, 30 Jan 2015 19:37:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2D39BE0916; Fri, 30 Jan 2015 19:37:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A1C82E0916 for ; Fri, 30 Jan 2015 19:37:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A94A33407B8 for ; Fri, 30 Jan 2015 19:37:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 452E910B55 for ; Fri, 30 Jan 2015 19:37:36 +0000 (UTC) From: "Brian Evans" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Evans" Message-ID: <1422646336.e8c0eadaaec5c5160cff4d8ecc7130f05dd7e39f.grknight@gentoo> Subject: [gentoo-commits] proj/mysql:master commit in: eclass/ X-VCS-Repository: proj/mysql X-VCS-Files: eclass/mysql-multilib.eclass X-VCS-Directories: eclass/ X-VCS-Committer: grknight X-VCS-Committer-Name: Brian Evans X-VCS-Revision: e8c0eadaaec5c5160cff4d8ecc7130f05dd7e39f X-VCS-Branch: master Date: Fri, 30 Jan 2015 19:37:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 7ffea143-ff7c-43d0-820b-d7251f928e22 X-Archives-Hash: 989c7075ca505e2ac6762702a57a8141 commit: e8c0eadaaec5c5160cff4d8ecc7130f05dd7e39f Author: Brian Evans gentoo org> AuthorDate: Fri Jan 30 19:32:16 2015 +0000 Commit: Brian Evans gentoo org> CommitDate: Fri Jan 30 19:32:16 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=e8c0eada Attempt to fix bug 508724 by forcing ld.bfd --- eclass/mysql-multilib.eclass | 82 ++++++++++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 33 deletions(-) diff --git a/eclass/mysql-multilib.eclass b/eclass/mysql-multilib.eclass index dc07df7..1749cb2 100644 --- a/eclass/mysql-multilib.eclass +++ b/eclass/mysql-multilib.eclass @@ -39,7 +39,7 @@ case "${EAPI:-0}" in *) die "Unsupported EAPI: ${EAPI}" ;; esac -EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_config +EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_config # # VARIABLES: @@ -410,6 +410,31 @@ mysql-multilib_disable_test() { # EBUILD FUNCTIONS # +# @FUNCTION: mysql-multilib_pkg_pretend +# @DESCRIPTION: +# Perform some basic tests and tasks during pkg_pretend phase: +mysql-multilib_pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]] ; then + # Bug 508724 + if [[ ${PN} == 'mariadb' || ${PN} == 'mariadb-galera' ]] && \ + test-flags-CC -fuse-ld=bfd > /dev/null && + $(tc-getLD) --version | grep -q "GNU gold"; then + eerror "MariaDB will not build with the gold linker." + eerror "Please select the bfd linker with binutils-config." + die "GNU gold detected" + fi + if use_if_iuse tokudb && [[ $(gcc-major-version) -lt 4 || \ + $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]] ; then + eerror "${PN} with tokudb needs to be built with gcc-4.7 or later." + eerror "Please use gcc-config to switch to gcc-4.7 or later version." + die + fi + fi + if use cluster && [[ "${PN}" != "mysql-cluster" ]]; then + die "NDB Cluster support has been removed from all packages except mysql-cluster" + fi +} + # @FUNCTION: mysql-multilib_pkg_setup # @DESCRIPTION: # Perform some basic tests and tasks during pkg_setup phase: @@ -430,23 +455,9 @@ mysql-multilib_pkg_setup() { enewgroup mysql 60 || die "problem adding 'mysql' group" enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" - if use cluster && [[ "${PN}" != "mysql-cluster" ]]; then - ewarn "Upstream has noted that the NDB cluster support in the 5.0 and" - ewarn "5.1 series should NOT be put into production. In the near" - ewarn "future, it will be disabled from building." - fi - if [[ ${PN} == "mysql-cluster" ]] ; then mysql_version_is_at_least "7.2.9" && java-pkg-opt-2_pkg_setup fi - - if use_if_iuse tokudb && [[ "${MERGE_TYPE}" != "binary" && $(gcc-major-version) -lt 4 || \ - $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]] ; then - eerror "${PN} with tokudb needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - } # @FUNCTION: mysql-multilib_src_unpack @@ -479,6 +490,29 @@ mysql-multilib_src_prepare() { # @DESCRIPTION: # Configure mysql to build the code for Gentoo respecting the use flags. mysql-multilib_src_configure() { + # Bug #114895, bug #110149 + filter-flags "-O" "-O[01]" + + CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" + CXXFLAGS="${CXXFLAGS} -felide-constructors" + # Causes linkage failures. Upstream bug #59607 removes it + if ! mysql_version_is_at_least "5.6" ; then + CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" + fi + # As of 5.7, exceptions are used! + if ! mysql_version_is_at_least "5.7" ; then + CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-rtti" + fi + export CXXFLAGS + + # bug #283926, with GCC4.4, this is required to get correct behavior. + append-flags -fno-strict-aliasing + + # bug 508724 mariadb cannot use ld.gold + if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then + append-ldflags $(test-flags-CXX -fuse-ld=bfd) + fi + multilib-minimal_src_configure } @@ -558,24 +592,6 @@ multilib_src_configure() { configure_cmake_minimal fi - # Bug #114895, bug #110149 - filter-flags "-O" "-O[01]" - - CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" - CXXFLAGS="${CXXFLAGS} -felide-constructors" - # Causes linkage failures. Upstream bug #59607 removes it - if ! mysql_version_is_at_least "5.6" ; then - CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" - fi - # As of 5.7, exceptions are used! - if ! mysql_version_is_at_least "5.7" ; then - CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-rtti" - fi - export CXXFLAGS - - # bug #283926, with GCC4.4, this is required to get correct behavior. - append-flags -fno-strict-aliasing - cmake-utils_src_configure }