summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/mold/files/mold-2.30.0-which-hunt.patch')
-rw-r--r--sys-devel/mold/files/mold-2.30.0-which-hunt.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/sys-devel/mold/files/mold-2.30.0-which-hunt.patch b/sys-devel/mold/files/mold-2.30.0-which-hunt.patch
new file mode 100644
index 000000000000..d8558091c4bc
--- /dev/null
+++ b/sys-devel/mold/files/mold-2.30.0-which-hunt.patch
@@ -0,0 +1,31 @@
+https://github.com/rui314/mold/pull/1246
+
+From ec0a9d09ddff8b1796ff1822d5381442cd28acb1 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 30 Apr 2024 07:54:40 +0100
+Subject: [PATCH] test: use `command -v`, not non-portable `which`
+
+`which` isn't in POSIX and several Linux distributions are trying to
+remove it from their base system, see e.g. https://lwn.net/Articles/874049/.
+
+Just use `command -v` which is POSIX.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ test/elf/exception-multiple-ehframe.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/elf/exception-multiple-ehframe.sh b/test/elf/exception-multiple-ehframe.sh
+index 8cc31624a..1b9f434a4 100755
+--- a/test/elf/exception-multiple-ehframe.sh
++++ b/test/elf/exception-multiple-ehframe.sh
+@@ -3,7 +3,7 @@
+
+ nm mold | grep -q '__tsan_init' && skip
+
+-which perl > /dev/null || skip
++command -v perl > /dev/null || skip
+
+ [ $MACHINE = m68k ] && skip
+ [ $MACHINE = sh4 ] && skip
+