From: Mike Frysinger Date: Sun, 11 Sep 2011 17:14:24 +0000 (+0000) Subject: support x86_64 multilib settings with gcc-4.7+ as they changed the style to append... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=ea6120aaa3d4f3e96c7bfcf85b59cc3c976ddff7;p=gentoo.git support x86_64 multilib settings with gcc-4.7+ as they changed the style to append the var rather than set it once --- diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index cab37b40e172..f5c59ee2fb32 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.464 2011/08/22 23:03:16 mattst88 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.465 2011/09/11 17:14:24 vapier Exp $ # # Maintainer: Toolchain Ninjas @@ -2369,13 +2369,7 @@ setup_multilib_osdirnames() { is_multilib || return 0 local config - local libdirs - - if [[ ${SYMLINK_LIB} == "yes" ]] ; then - libdirs="../lib64 ../lib32" - else - libdirs="../lib64 ../lib" - fi + local libdirs="../lib64 ../lib32" # this only makes sense for some Linux targets case ${CTARGET} in @@ -2387,8 +2381,18 @@ setup_multilib_osdirnames() { esac config+="/t-linux64" - einfo "updating multilib directories to be: ${libdirs}" - sed -i -e "/^MULTILIB_OSDIRNAMES/s:=.*:= ${libdirs}:" "${S}"/gcc/config/${config} || die + if [[ ${SYMLINK_LIB} == "yes" ]] ; then + einfo "updating multilib directories to be: ${libdirs}" + if tc_version_is_at_least 4.7 && [[ ${CTARGET} == x86_64*-linux* ]] ; then + set -- -e '/^MULTILIB_OSDIRNAMES.*lib32/s:[$][(]if.*):../lib32:' + else + set -- -e "/^MULTILIB_OSDIRNAMES/s:=.*:= ${libdirs}:" + fi + else + einfo "using upstream multilib; disabling lib32 autodetection" + set -- -r -e 's:[$][(]if.*,(.*)[)]:\1:' + fi + sed -i "$@" "${S}"/gcc/config/${config} || die } disable_multilib_libjava() {