3
0
Fork 0
forked from mirrors/nixpkgs

spidermonkey: fix host, target settings

spidermonkey doesn’t use the autotools build, host, target convention.
Instead it considers ‘--host’ to be the autotools’ ‘--build’ and
‘--target’ to be the autotools’ ‘--host’! As a result, we cannot
safely use “configurePlatforms”. Instead, we must manually set these
flags.

/cc @illegalprime
This commit is contained in:
Matthew Bauer 2019-04-19 11:55:38 -04:00
parent fb3df59c6b
commit 65f2b0a2a3

View file

@ -31,7 +31,7 @@ in stdenv.mkDerivation rec {
})
];
configurePlatforms = [ "host" "target" ];
configurePlatforms = [ ];
preConfigure = ''
export CXXFLAGS="-fpermissive"
@ -51,7 +51,11 @@ in stdenv.mkDerivation rec {
"--with-intl-api"
"--enable-readline"
"--enable-shared-js"
] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-jemalloc";
] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-jemalloc"
++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"--host=${stdenv.buildPlatform.config}"
"--target=${stdenv.hostPlatform.config}"
];
makeFlags = [
"HOST_CC=${buildPackages.stdenv.cc}/bin/cc"