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
91.nix
102.nix
115.nix
add-riscv64-support.patch
allow-system-s-nspr-and-icu-on-bootstrapped-sysroot.patch
always-check-for-pkg-config.patch
common.nix pkgsMusl.spidermonkey: fix build on x86_64-linux 2024-02-01 15:36:20 +01:00
fix-float-i686.patch
test.nix