nixpkgs/pkgs/development/interpreters/spidermonkey
Alyssa Ross b33fd42c30 pkgsMusl.spidermonkey: fix build on x86_64-linux
rustc 1.73.0 introduced a new x86_64-unikraft-linux-musl target.  This
triple is a bit of a lie — the kernel in this case is unikraft, which
isn't Linux, it just tries to be compatible with it.  But this
User-Agent-like string of a triple now exists, and with it comes some
fallout.

Spidermonkey asks rustc for the list of supported targets, then picks
the one that best matches the GNU triple it's building for, which in
the native case config.guess will say is x86_64-pc-linux-musl.  Prior
to rustc 1.73.0, all was well, because there was only one x86_64 musl
triple, but now there are two: x86_64-unknown-linux-musl, and
x86_64-unikraft-linux-musl, and neither of those are obviously closer
than the other to x86_64-pc-linux-musl to Spidermonkey's build system.
As a result, it can't decide which target to pass to rustc, and bails
out.

We can fix this by telling Spidermonkey what platform it should be
building for, rather than letting it guess, which previously we did
only when cross compiling.  This approach is already used in the
Firefox derivation (which is why it was not affected by the rustc
update), so it's been well tested already.

Closes: https://github.com/NixOS/nixpkgs/pull/266560
Closes: https://github.com/NixOS/nixpkgs/pull/282923
2024-02-01 15:36:20 +01:00
..
78.nix spidermonkey_78: factor out into a common expression 2022-08-10 23:33:20 +02:00
91.nix spidermonkey_91: 91.12.0 -> 91.13.0 2023-02-14 19:31:55 +01:00
102.nix spidermonkey_102: 102.12.0 -> 102.13.0 2023-07-04 16:28:47 +02:00
115.nix spidermonkey_115: init at 115.2.0 2023-09-03 18:28:07 +08:00
add-riscv64-support.patch
allow-system-s-nspr-and-icu-on-bootstrapped-sysroot.patch spidermonkey_*: fix build under macOS 2022-08-10 23:33:20 +02:00
always-check-for-pkg-config.patch spidermonkey_*: fix build under macOS 2022-08-10 23:33:20 +02:00
common.nix pkgsMusl.spidermonkey: fix build on x86_64-linux 2024-02-01 15:36:20 +01:00
fix-float-i686.patch spidermonkey: fix i686 build 2022-09-25 16:12:45 +03:00
test.nix spidermonkey_*: add tests 2022-08-10 23:33:20 +02:00