From 65f2b0a2a32bb0d84f55ca7bb8c9a33e8ba28713 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Fri, 19 Apr 2019 11:55:38 -0400 Subject: [PATCH] spidermonkey: fix host, target settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- pkgs/development/interpreters/spidermonkey/52.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/spidermonkey/52.nix b/pkgs/development/interpreters/spidermonkey/52.nix index 1d7a11df5a41..feac99b2d8e5 100644 --- a/pkgs/development/interpreters/spidermonkey/52.nix +++ b/pkgs/development/interpreters/spidermonkey/52.nix @@ -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"