From 43e0f0688a19bbd88cdf898efb7b14ecf09717c4 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Wed, 4 Aug 2021 23:48:22 +0200 Subject: [PATCH] boost: always set toolset for known compilers There is an edge case when cross compiling where the auto detection script would not correctly recognize the compiler (as it is only good at recognizing native compilers, really, which we don't have anymore since we don't need the build->build one anymore). If bootstrap.sh doesn't detect the compiler correctly, it'll generate a project-config.jam with a syntax error which breaks the build in a hard to spot way: only a warning is displayed after configuring, the build will appear to run normally until it fails quietly just before installing. By providing it explicitly, we can prevent this. --- pkgs/development/libraries/boost/generic.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index f1a39c3d8cdb..7ea7902e0873 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -3,6 +3,7 @@ , fetchpatch , which , toolset ? /**/ if stdenv.cc.isClang then "clang" + else if stdenv.cc.isGNU then "gcc" else null , enableRelease ? true , enableDebug ? false @@ -193,6 +194,7 @@ stdenv.mkDerivation { "--libdir=$(out)/lib" "--with-bjam=b2" # prevent bootstrapping b2 in configurePhase ] ++ optional enablePython "--with-python=${python.interpreter}" + ++ optional (toolset != null) "--with-toolset=${toolset}" ++ [ (if stdenv.hostPlatform == stdenv.buildPlatform then "--with-icu=${icu.dev}" else "--without-icu") ]; buildPhase = ''