p/f/prefix/s/profile.bashrc: new location of emultempl/elf32.em.
authorBenda Xu <heroxbd@gentoo.org>
Wed, 12 Feb 2020 12:13:09 +0000 (20:13 +0800)
committerBenda Xu <heroxbd@gentoo.org>
Wed, 12 Feb 2020 12:15:51 +0000 (20:15 +0800)
  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@gentoo.org>
profiles/features/prefix/standalone/profile.bashrc

index 20a3aff74cf5dc3f2a4e4a12a45a6a1d3b84e6a6..49293adb98d1775b9541051141a8eccd07699487 100644 (file)
@@ -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}"