1 |
Signed-off-by: James Le Cuirot <chewi@g.o> |
2 |
--- |
3 |
eclass/toolchain.eclass | 13 +++++++++++++ |
4 |
profiles/features/prefix/standalone/profile.bashrc | 14 +------------- |
5 |
2 files changed, 14 insertions(+), 13 deletions(-) |
6 |
|
7 |
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass |
8 |
index 479814f0df3e..6d8901d21812 100644 |
9 |
--- a/eclass/toolchain.eclass |
10 |
+++ b/eclass/toolchain.eclass |
11 |
@@ -719,6 +719,19 @@ toolchain_src_prepare() { |
12 |
einfo "Remove texinfo (bug #198182, bug #464008)" |
13 |
eapply "${FILESDIR}"/gcc-configure-texinfo.patch |
14 |
|
15 |
+ if ! use prefix-guest && [[ -n ${EPREFIX} ]] ; then |
16 |
+ einfo "Prefixifying dynamic linkers..." |
17 |
+ for f in gcc/config/*/*linux*.h ; do |
18 |
+ ebegin " Updating ${f}" |
19 |
+ if [[ ${f} == gcc/config/rs6000/linux*.h ]]; then |
20 |
+ sed -i -r "s,(DYNAMIC_LINKER_PREFIX\s+)\"\",\1\"${EPREFIX}\",g" "${f}" || die |
21 |
+ else |
22 |
+ sed -i -r "/_DYNAMIC_LINKER/s,([\":])(/lib),\1${EPREFIX}\2,g" "${f}" || die |
23 |
+ fi |
24 |
+ eend $? |
25 |
+ done |
26 |
+ fi |
27 |
+ |
28 |
# >=gcc-4 |
29 |
if [[ -x contrib/gcc_update ]] ; then |
30 |
einfo "Touching generated files" |
31 |
diff --git a/profiles/features/prefix/standalone/profile.bashrc b/profiles/features/prefix/standalone/profile.bashrc |
32 |
index 043f766c37e9..57ec4b57abcb 100644 |
33 |
--- a/profiles/features/prefix/standalone/profile.bashrc |
34 |
+++ b/profiles/features/prefix/standalone/profile.bashrc |
35 |
@@ -9,19 +9,7 @@ |
36 |
# Disable RAP trick during bootstrap stage2 |
37 |
[[ -z ${BOOTSTRAP_RAP_STAGE2} ]] || return 0 |
38 |
|
39 |
-if [[ ${CATEGORY}/${PN} == sys-devel/gcc && ${EBUILD_PHASE} == configure ]]; then |
40 |
- cd "${S}" |
41 |
- einfo "Prefixifying dynamic linkers..." |
42 |
- for h in gcc/config/*/*linux*.h; do |
43 |
- ebegin " Updating $h" |
44 |
- if [[ "${h}" == gcc/config/rs6000/linux*.h ]]; then |
45 |
- sed -i -r "s,(DYNAMIC_LINKER_PREFIX\s+)\"\",\1\"${EPREFIX}\",g" $h |
46 |
- else |
47 |
- sed -i -r "/_DYNAMIC_LINKER/s,([\":])(/lib),\1${EPREFIX}\2,g" $h |
48 |
- fi |
49 |
- eend $? |
50 |
- done |
51 |
-elif [[ ${CATEGORY}/${PN} == sys-devel/clang && ${EBUILD_PHASE} == configure ]]; then |
52 |
+if [[ ${CATEGORY}/${PN} == sys-devel/clang && ${EBUILD_PHASE} == configure ]]; then |
53 |
ebegin "Use ${EPREFIX} as default sysroot" |
54 |
sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" "${S}"/CMakeLists.txt |
55 |
eend $? |
56 |
-- |
57 |
2.39.1 |