summaryrefslogtreecommitdiff
path: root/sys-devel/mold/files/mold-2.30.0-which-hunt.patch
blob: d8558091c4bcae2bf932c91c39fca752d3e5e7b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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