Skip to contentSkip to conversation

mozjs-115: Apply autoconf tuple mismatch fix

PATCH New Khem Raj 1 participant 1 message Sep 25, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 mozjs-115: Apply autoconf tuple mismatch fix

Fixes
DEBUG: | Invalid configuration riscv64gc-yoe-linux-gnu': machine riscv64gc-yoe' not recognized

---
 ...-autoconf-s-config.sub-to-canonicali.patch | 25 +++++++++++++++----
 .../mozjs/mozjs-115_115.2.0.bb                |  1 +
 2 files changed, 21 insertions(+), 5 deletions(-)
meta-oe/recipes-extended/mozjs/mozjs-115/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch +20 -5
index fe905fe4dd..38496ea56c 100644
@@ -14,16 +14,31 @@ Signed-off-by: Alexander Kanavin <[email protected]>
  build/moz.configure/init.configure | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
-index 81f500a0b7..0b7a2ff60f 100644
 --- a/build/moz.configure/init.configure
 +++ b/build/moz.configure/init.configure
-@@ -585,7 +585,7 @@ def help_host_target(help, host, target):
+@@ -647,24 +647,7 @@ def help_host_target(help, host, target)
  
  def config_sub(shell, triplet):
      config_sub = os.path.join(os.path.dirname(__file__), "..", "autoconf", "config.sub")
--    return check_cmd_output(shell, config_sub, triplet).strip()
+-    # Config.sub doesn't like the *-windows-msvc/*-windows-gnu triplets, so
+-    # munge those before and after calling config.sub.
+-    suffix = None
+-    munging = {
+-        "-windows-msvc": "-mingw32",
+-        "-windows-gnu": "-mingw32",
+-    }
+-    for check_suffix, replacement in munging.items():
+-        if triplet.endswith(check_suffix):
+-            suffix = check_suffix
+-            triplet = triplet[: -len(suffix)] + replacement
+-            break
+-    result = check_cmd_output(shell, config_sub, triplet).strip()
+-    if suffix:
+-        assert result.endswith(replacement)
+-        result = result[: -len(replacement)] + suffix
+-    return result
+-
 +    return triplet
  
- 
  @depends("--host", shell)
+ @checking("for host system type", lambda h: h.alias)
meta-oe/recipes-extended/mozjs/mozjs-115_115.2.0.bb +1 -0
index 799b8abd90..babe39822a 100644
@@ -9,6 +9,7 @@ SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/fire
            file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \
            file://0004-use-asm-sgidefs.h.patch \
            file://fix-musl-build.patch \
+           file://0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch \
            file://riscv32.patch \
            file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \
            file://0001-rewrite-cargo-host-linker-in-python3.patch  \
Signature · 1 line
2.42.0