public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "James Le Cuirot" <chewi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/, profiles/features/prefix/standalone/
Date: Sat, 28 Jan 2023 22:12:24 +0000 (UTC)	[thread overview]
Message-ID: <1674943880.597efc1908793a77001d42ebbd96ebb07f8ee631.chewi@gentoo> (raw)

commit:     597efc1908793a77001d42ebbd96ebb07f8ee631
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  7 14:58:43 2023 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Jan 28 22:11:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=597efc19

toolchain.eclass: Move remaining gcc prefix tweaks from profile

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 eclass/toolchain.eclass                            | 13 +++++++++++++
 profiles/features/prefix/standalone/profile.bashrc | 14 +-------------
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 479814f0df3e..6d8901d21812 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -719,6 +719,19 @@ toolchain_src_prepare() {
 	einfo "Remove texinfo (bug #198182, bug #464008)"
 	eapply "${FILESDIR}"/gcc-configure-texinfo.patch
 
+	if ! use prefix-guest && [[ -n ${EPREFIX} ]] ; then
+		einfo "Prefixifying dynamic linkers..."
+		for f in gcc/config/*/*linux*.h ; do
+			ebegin "  Updating ${f}"
+			if [[ ${f} == gcc/config/rs6000/linux*.h ]]; then
+				sed -i -r "s,(DYNAMIC_LINKER_PREFIX\s+)\"\",\1\"${EPREFIX}\",g" "${f}" || die
+			else
+				sed -i -r "/_DYNAMIC_LINKER/s,([\":])(/lib),\1${EPREFIX}\2,g" "${f}" || die
+			fi
+			eend $?
+		done
+	fi
+
 	# >=gcc-4
 	if [[ -x contrib/gcc_update ]] ; then
 		einfo "Touching generated files"

diff --git a/profiles/features/prefix/standalone/profile.bashrc b/profiles/features/prefix/standalone/profile.bashrc
index 043f766c37e9..57ec4b57abcb 100644
--- a/profiles/features/prefix/standalone/profile.bashrc
+++ b/profiles/features/prefix/standalone/profile.bashrc
@@ -9,19 +9,7 @@
 # Disable RAP trick during bootstrap stage2
 [[ -z ${BOOTSTRAP_RAP_STAGE2} ]] || return 0
 
-if [[ ${CATEGORY}/${PN} == sys-devel/gcc && ${EBUILD_PHASE} == configure ]]; then
-    cd "${S}"
-    einfo "Prefixifying dynamic linkers..."
-    for h in gcc/config/*/*linux*.h; do
-	ebegin "  Updating $h"
-	if [[ "${h}" == gcc/config/rs6000/linux*.h ]]; then
-	    sed -i -r "s,(DYNAMIC_LINKER_PREFIX\s+)\"\",\1\"${EPREFIX}\",g" $h
-	else
-	    sed -i -r "/_DYNAMIC_LINKER/s,([\":])(/lib),\1${EPREFIX}\2,g" $h
-	fi
-	eend $?
-    done
-elif [[ ${CATEGORY}/${PN} == sys-devel/clang && ${EBUILD_PHASE} == configure ]]; then
+if [[ ${CATEGORY}/${PN} == sys-devel/clang && ${EBUILD_PHASE} == configure ]]; then
     ebegin "Use ${EPREFIX} as default sysroot"
     sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" "${S}"/CMakeLists.txt
     eend $?


                 reply	other threads:[~2023-01-28 22:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1674943880.597efc1908793a77001d42ebbd96ebb07f8ee631.chewi@gentoo \
    --to=chewi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox