commit:     0e74313ccdf8a00d796f76583a3aece6cf4beb05
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 12 12:13:09 2020 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Wed Feb 12 12:15:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e74313c

p/f/prefix/s/profile.bashrc: new location of emultempl/elf32.em.

  From binutils-2.34, /etc/ld.so.conf is coded in ld/ldelf.c instead.

Closes: https://bugs.gentoo.org/708184
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 profiles/features/prefix/standalone/profile.bashrc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/profiles/features/prefix/standalone/profile.bashrc 
b/profiles/features/prefix/standalone/profile.bashrc
index 20a3aff74cf..49293adb98d 100644
--- a/profiles/features/prefix/standalone/profile.bashrc
+++ b/profiles/features/prefix/standalone/profile.bashrc
@@ -38,8 +38,15 @@ elif [[ ${CATEGORY}/${PN} == sys-devel/binutils && 
${EBUILD_PHASE} == prepare ]]
     sed -i -r "/NATIVE_LIB_DIRS/s,((/usr(/local|)|)/lib),${EPREFIX}\1,g" \
        "${S}"/ld/configure.tgt
     eend $?
+
     ebegin "Prefixifying path to /etc/ld.so.conf"
-    sed -i -r "s,\"/etc,\"${EPREFIX}/etc," "${S}"/ld/emultempl/elf32.em
+    local f=
+    if [[ -f "${S}"/ld/emultempl/elf32.em ]]; then
+        f="${S}"/ld/emultempl/elf32.em
+    elif [[ -f "${S}"/ld/ldelf.c ]]; then
+        f="${S}"/ld/ldelf.c
+    fi
+    [[ -n "${f}" ]] && sed -i -r "s,\"/etc,\"${EPREFIX}/etc," "${f}"
     eend $?
 elif [[ ${CATEGORY}/${PN} == sys-libs/glibc && ${EBUILD_PHASE} == compile ]]; 
then
     cd "${S}"

Reply via email to