diff options
author | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2021-08-04 23:48:22 +0200 |
---|---|---|
committer | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2021-08-04 23:48:22 +0200 |
commit | 43e0f0688a19bbd88cdf898efb7b14ecf09717c4 (patch) | |
tree | 5816b2c42f0e8af103619f2c8d34261deedeeedd /pkgs/development/libraries/boost | |
parent | d20aa4955d4c31d8393753ddf088e1ee82c5d12e (diff) | |
download | nixpkgs-43e0f0688a19bbd88cdf898efb7b14ecf09717c4.tar nixpkgs-43e0f0688a19bbd88cdf898efb7b14ecf09717c4.tar.gz nixpkgs-43e0f0688a19bbd88cdf898efb7b14ecf09717c4.tar.bz2 nixpkgs-43e0f0688a19bbd88cdf898efb7b14ecf09717c4.tar.lz nixpkgs-43e0f0688a19bbd88cdf898efb7b14ecf09717c4.tar.xz nixpkgs-43e0f0688a19bbd88cdf898efb7b14ecf09717c4.tar.zst nixpkgs-43e0f0688a19bbd88cdf898efb7b14ecf09717c4.zip |
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.
Diffstat (limited to 'pkgs/development/libraries/boost')
-rw-r--r-- | pkgs/development/libraries/boost/generic.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index f1a39c3d8cd..7ea7902e087 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 = '' |