public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/mozjs128] rawhide: Fix build with latest rust
Date: Mon, 26 Oct 2026 21:49:11 GMT [thread overview]
Message-ID: <179305135134.1.3951146953912849582.rpms-mozjs128-11a5aee536a5@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/mozjs128
Branch : rawhide
Commit : 11a5aee536a5b73b90d819432c3457b9684ef54a
Author : Yaakov Selkowitz <yselkowi@redhat.com>
Date : 2026-10-20T01:23:48-04:00
Stats : +62/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/mozjs128/c/11a5aee536a5b73b90d819432c3457b9684ef54a?branch=rawhide
Log:
Fix build with latest rust
---
diff --git a/mozjs128.spec b/mozjs128.spec
index 26cb555..ac3bd31 100644
--- a/mozjs128.spec
+++ b/mozjs128.spec
@@ -68,6 +68,11 @@ Patch21: D261512.1755672843.diff
# GC patch - https://gitea.wildfiregames.com/0ad/0ad/issues/8757
Patch22: FixExtraGCTracing.diff
+# Fix target detection with latest rust
+# https://phabricator.services.mozilla.com/D311145
+# https://phabricator.services.mozilla.com/D330023
+Patch23: rust-configure.patch
+
BuildRequires: cargo
%if "%{toolchain}" == "clang"
BuildRequires: clang
diff --git a/rust-configure.patch b/rust-configure.patch
new file mode 100644
index 0000000..9df6ba1
--- /dev/null
+++ b/rust-configure.patch
@@ -0,0 +1,57 @@
+diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
+index 5525c26a184d..35cb30416c64 100644
+--- a/build/moz.configure/rust.configure
++++ b/build/moz.configure/rust.configure
+@@ -298,6 +298,12 @@ def detect_rustc_target(host_or_target, arm_target, rust_supported_targets):
+ elif not candidates:
+ return None
+
++ vendor = (
++ host_or_target.vendor
++ if any(c.target.vendor == host_or_target.vendor for c in candidates)
++ else "unknown"
++ )
++
+ # We have multiple candidates. There are two cases where we can try to
+ # narrow further down using extra information from the build system.
+ # - For windows targets, correlate with the C compiler type
+@@ -360,11 +364,19 @@ def detect_rustc_target(host_or_target, arm_target, rust_supported_targets):
+ else:
+ suffix = ""
+ for p in prefixes:
+- for c in candidates:
+- if c.rust_target.startswith(
+- "{}-".format(p)
+- ) and c.rust_target.endswith(suffix):
++ matches = [
++ c
++ for c in candidates
++ if c.rust_target.startswith("{}-".format(p))
++ and c.rust_target.endswith(suffix)
++ ]
++ if not matches:
++ continue
++ # As below, correlate on the (normalized) vendor.
++ for c in matches:
++ if c.target.vendor == vendor:
+ return c.rust_target
++ return matches[0].rust_target
+
+ # See if we can narrow down on the exact alias.
+ # We use the sub_configure_alias to keep support mingw32 triplets as input.
+@@ -393,6 +405,15 @@ def detect_rustc_target(host_or_target, arm_target, rust_supported_targets):
+ elif narrowed:
+ candidates = narrowed
+
++ # Correlate on the (normalized) vendor, so vendor-specific targets (e.g.
++ # the *-oe-linux-gnu targets added in rust 1.98) don't shadow the
++ # generic ones for aliases whose vendor doesn't match a rust target.
++ narrowed = [c for c in candidates if c.target.vendor == vendor]
++ if len(narrowed) == 1:
++ return narrowed[0].rust_target
++ elif narrowed:
++ candidates = narrowed
++
+ # See if we can narrow down with the raw OS and raw CPU
+ narrowed = [
+ c
reply other threads:[~2026-10-26 21:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179305135134.1.3951146953912849582.rpms-mozjs128-11a5aee536a5@fedoraproject.org \
--to=yselkowi@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox