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 D5F4B1381F3 for ; Mon, 19 Nov 2012 06:52:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 785CD21C018; Mon, 19 Nov 2012 06:52:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DA44521C018 for ; Mon, 19 Nov 2012 06:52:06 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ED4B033BF55 for ; Mon, 19 Nov 2012 06:52:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 3FC26E5436 for ; Mon, 19 Nov 2012 06:52:03 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1353294671.7ee46ae0f636f56054df4035f50de79af03e3657.vapier@gentoo> Subject: [gentoo-commits] proj/gcc-config:master commit in: / X-VCS-Repository: proj/gcc-config X-VCS-Files: gcc-config X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 7ee46ae0f636f56054df4035f50de79af03e3657 X-VCS-Branch: master Date: Mon, 19 Nov 2012 06:52:03 +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: 8046e61f-c328-4e9c-9d2f-3f20e9a9e651 X-Archives-Hash: 79215f5acf34d21682745c9582cafed4 commit: 7ee46ae0f636f56054df4035f50de79af03e3657 Author: Mike Frysinger gentoo org> AuthorDate: Mon Nov 19 01:44:11 2012 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Nov 19 03:11:11 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gcc-config.git;a=commit;h=7ee46ae0 gcc-config: handle multilib libgcj pc files Scan all of the multilib dirs that gcc supports and handle libgcj pc files for each one. URL: http://bugs.gentoo.org/435728 Reported-by: Michał Górny gentoo.org> Signed-off-by: Mike Frysinger gentoo.org> --- gcc-config | 31 ++++++++++++++++++------------- 1 files changed, 18 insertions(+), 13 deletions(-) diff --git a/gcc-config b/gcc-config index 0406f95..18d0b48 100755 --- a/gcc-config +++ b/gcc-config @@ -354,8 +354,10 @@ switch_profile() { fi # Setup things properly again for this profile - unset GCC_SPECS LDPATH + unset GCC_SPECS LDPATH MULTIOSDIRS source "${GCC_ENV_D}/${CC_COMP}" + # Support older configs that did not setup MULTIOSDIRS for us. + : ${MULTIOSDIRS:=../${GENTOO_LIBDIR}} # Ignore active profile errors here since we're switching away OLD_CC_COMP=$(get_current_profile 2>/dev/null) @@ -404,7 +406,7 @@ switch_profile() { ) # Pass all by default - awk '!/^(STDCXX_INCDIR|LDPATH|CC|CXX|CTARGET|GCCBITS|GCC_SPECS|GCC_PATH)=/ {print $0}' \ + awk '!/^(STDCXX_INCDIR|LDPATH|CC|CXX|CTARGET|GCCBITS|GCC_SPECS|GCC_PATH|MULTIOSDIRS)=/ {print $0}' \ "${GCC_ENV_D}/${CC_COMP}" >> "${envd}.tmp" if [[ -d ${ROOT}/etc/ld.so.conf.d ]] ; then echo "${MY_LDPATH}" > "${ROOT}"/etc/ld.so.conf.d/05gcc-${CTARGET}.conf @@ -422,19 +424,22 @@ switch_profile() { ln -sf ${CC_COMP} "${GCC_ENV_D}/.NATIVE" # Relocate random crap - local pkgconfdir="${ROOT}/usr/${GENTOO_LIBDIR}/pkgconfig" + local x libdir pkgconfdir local mver=${CC_COMP_VERSION:0:3} - for x in "" "-${mver}" ; do - x="${pkgconfdir}/libgcj${x}.pc" - if [[ -e ${pkgconfdir}/libgcj-${CC_COMP_VERSION}.pc ]] ; then - ln -sf libgcj-${CC_COMP_VERSION}.pc "${x}" - else - # Maybe we selected a version that lacks gcj support. - rm -f "${x}" - fi + for libdir in ${MULTIOSDIRS//:/ } ; do + pkgconfdir="${ROOT}/usr/lib/${libdir}/pkgconfig" + for x in "" "-${mver}" ; do + x="${pkgconfdir}/libgcj${x}.pc" + if [[ -e ${pkgconfdir}/libgcj-${CC_COMP_VERSION}.pc ]] ; then + ln -sf libgcj-${CC_COMP_VERSION}.pc "${x}" + else + # Maybe we selected a version that lacks gcj support. + rm -f "${x}" + fi + done + # Clean out anything left over from older versions. #430932 + find "${pkgconfdir}"/libgcj*.pc -xtype l -delete 2>/dev/null done - # Clean out anything left over from older versions. #430932 - find "${pkgconfdir}"/libgcj*.pc -xtype l -delete 2>/dev/null handle_split_usr : $(( envd_changed += $? ))