commit:     26b682b761319af5dc0c5d5af2ffb441faf612f0
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 12 06:41:58 2014 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Dec 12 06:41:58 2014 +0000
URL:        https://gitweb.gentoo.org/dev/mgorny.git/commit/?id=26b682b7

sys-devel/gcc: Call gcc-config for multilib ABIs

Package-Manager: portage-2.2.15

 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index f51749c..e77f7e9 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -606,17 +606,17 @@ src_install() {
 
 switch_gcc() {
        local curr_config curr_pv
-       # config name: ${CTARGET}-${PV}
-       curr_config=$(env -i ROOT="${ROOT}" gcc-config -c "${CTARGET}" 2>&1)
+       # config name: ${CHOST}-${PV}
+       curr_config=$(env -i ROOT="${ROOT}" gcc-config -c "${CHOST}" 2>&1)
 
        # no config? switch!
        if [[ -z ${curr_config} ]]; then
-               gcc-config "${CTARGET}-${PV}"
+               gcc-config "${CHOST}-${PV}"
                return
        fi
 
        # some config? argh, we need to parse it.
-       split_config=( $(env -i ROOT="${ROOT}" gcc-config -S "${CTARGET}") )
+       split_config=( $(env -i ROOT="${ROOT}" gcc-config -S "${CHOST}") )
 
        # different branch? we aren't doing such leaps ourselves.
        if [[ ${split_config[1]%.*} != ${PV%.*} ]]; then
@@ -625,19 +625,19 @@ switch_gcc() {
        fi
 
        if [[ -n ${split_config[2]} ]]; then
-               if [[ -f 
${ROOT}/etc/env.d/gcc/${CTARGET}-${PV}-${split_config[2]} ]]
+               if [[ -f 
${ROOT}/etc/env.d/gcc/${CHOST}-${PV}-${split_config[2]} ]]
                then
-                       gcc-config "${CTARGET}-${PV}-${split_config[2]}"
+                       gcc-config "${CHOST}-${PV}-${split_config[2]}"
                        return
                else
                        ewarn "Spec '${split_config[2]}' used so far is no 
longer available."
                        ewarn "The default will be used instead."
                fi
 
-               gcc-config "${CTARGET}-${PV}"
+               gcc-config "${CHOST}-${PV}"
        fi
 }
 
 pkg_postinst() {
-       switch_gcc
+       multilib_foreach_abi switch_gcc
 }

Reply via email to