summaryrefslogtreecommitdiff
path: root/lang/spidermonkey102/files/patch-moz.configure
blob: 40a6a8adbcc39b4d4903c7d7d18f80b1c3e7351c (plain) (blame)
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
- Fix awk detection

- also look in stderr for readelf --help output (elftoolchain bsd readelf)

Index: moz.configure
--- moz.configure.orig	2022-10-10 09:55:56 UTC
+++ moz.configure
@@ -708,7 +708,7 @@ add_old_configure_assignment("CLANG_PLUGIN", clang_plu
 
 # Awk detection
 # ==============================================================
-awk = check_prog("AWK", ("gawk", "mawk", "nawk", "awk"))
+awk = check_prog('AWK', ('awk',))
 
 # Until the AWK variable is not necessary in old-configure
 
@@ -812,7 +812,8 @@ def validate_readelf(path):
     # option in the `--help` output, which fortunately, s compatible between
     # llvm-readelf and readelf.
     retcode, stdout, stderr = get_cmd_output(path, "--help")
-    return retcode == 0 and any(l.startswith("  -d ") for l in stdout.splitlines())
+    return retcode == 0 and (any(l.startswith("  -d ") for l in stdout.splitlines()) \
+        or any(l.startswith("  -d ") for l in stderr.splitlines()))


 @depends("--enable-compile-environment", target, host)