diff options
author | James Le Cuirot <chewi@gentoo.org> | 2023-01-07 14:58:43 +0000 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2023-01-28 22:11:20 +0000 |
commit | 597efc1908793a77001d42ebbd96ebb07f8ee631 (patch) | |
tree | b20508a16f5f85481499b355f98c948dbff7e560 /eclass | |
parent | toolchain.eclass: Fix cross-compiling gcc for standalone prefix (diff) | |
download | gentoo-597efc1908793a77001d42ebbd96ebb07f8ee631.tar.gz gentoo-597efc1908793a77001d42ebbd96ebb07f8ee631.tar.bz2 gentoo-597efc1908793a77001d42ebbd96ebb07f8ee631.zip |
toolchain.eclass: Move remaining gcc prefix tweaks from profile
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain.eclass | 13 |
1 files changed, 13 insertions, 0 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" |