diff options
author | Sam James <sam@gentoo.org> | 2021-12-14 02:47:12 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-12-14 02:47:12 +0000 |
commit | 710206365ed860b159d2620a28ba6e6b92145179 (patch) | |
tree | 131a2bb24b3988300b72c54d2a6a6b9198386389 /sys-devel/mold/files/mold-0.9.6-fix-libdir-wrapper.patch | |
parent | sys-boot/raspberrypi-firmware: Stabilize 1.20210527 arm, #828387 (diff) | |
download | gentoo-710206365ed860b159d2620a28ba6e6b92145179.tar.gz gentoo-710206365ed860b159d2620a28ba6e6b92145179.tar.bz2 gentoo-710206365ed860b159d2620a28ba6e6b92145179.zip |
sys-devel/mold: fix wrapper libdir path
Bug: https://github.com/rui314/mold/issues/127
Closes: https://bugs.gentoo.org/823653
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-devel/mold/files/mold-0.9.6-fix-libdir-wrapper.patch')
-rw-r--r-- | sys-devel/mold/files/mold-0.9.6-fix-libdir-wrapper.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sys-devel/mold/files/mold-0.9.6-fix-libdir-wrapper.patch b/sys-devel/mold/files/mold-0.9.6-fix-libdir-wrapper.patch new file mode 100644 index 000000000000..d8155cde8f58 --- /dev/null +++ b/sys-devel/mold/files/mold-0.9.6-fix-libdir-wrapper.patch @@ -0,0 +1,26 @@ +Should be fixed with a LIBDIR variable in the next release. + +https://bugs.gentoo.org/823653 +https://github.com/rui314/mold/issues/127 +--- a/elf/subprocess.cc ++++ b/elf/subprocess.cc +@@ -267,18 +267,7 @@ + + template <typename E> + std::string find_dso(Context<E> &ctx, const std::string &self) { +- // Look for mold-wrapper.so from the same directory as the executable is. +- std::string path = std::string(path_dirname(self)) + "/mold-wrapper.so"; +- if (is_regular_file(path)) +- return path; +- +- // If not exist, mold might be installed as $PREFIX/bin/mold and the +- // DSO as $PREFIX/lib/mold/mold-wrapper.so. +- path = path_clean(self + "/../../lib/mold/mold-wrapper.so"); +- if (is_regular_file(path)) +- return path; +- +- Fatal(ctx) << "mold-wrapper.so is missing"; ++ return "/usr/lib64/mold/mold-wrapper.so"; + } + + template <typename E> |