diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-06-23 22:43:05 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2018-06-23 22:43:05 -0400 |
commit | f45211bd6d0f16c3a3c9919f163a060c9f804ca2 (patch) | |
tree | 5881469dd342d2cf90ace9c79b7fe3dc39a30ccd /pkgs/development/libraries/boost | |
parent | 4f6d61e5cfbf64ce333c17b54cc307ba582aae18 (diff) | |
download | nixpkgs-f45211bd6d0f16c3a3c9919f163a060c9f804ca2.tar nixpkgs-f45211bd6d0f16c3a3c9919f163a060c9f804ca2.tar.gz nixpkgs-f45211bd6d0f16c3a3c9919f163a060c9f804ca2.tar.bz2 nixpkgs-f45211bd6d0f16c3a3c9919f163a060c9f804ca2.tar.lz nixpkgs-f45211bd6d0f16c3a3c9919f163a060c9f804ca2.tar.xz nixpkgs-f45211bd6d0f16c3a3c9919f163a060c9f804ca2.tar.zst nixpkgs-f45211bd6d0f16c3a3c9919f163a060c9f804ca2.zip |
boost: use standardized system information
Diffstat (limited to 'pkgs/development/libraries/boost')
-rw-r--r-- | pkgs/development/libraries/boost/generic.nix | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index efe1151359d..00c6d279c7a 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -1,8 +1,7 @@ { stdenv, fetchurl, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, libiconv , which , buildPackages, buildPlatform, hostPlatform -, toolset ? /**/ if stdenv.cc.isClang then "clang" - else if stdenv.cc.isGNU && hostPlatform != buildPlatform then "gcc-cross" +, toolset ? /**/ if stdenv.cc.isClang then "clang" else null , enableRelease ? true , enableDebug ? false @@ -58,16 +57,26 @@ let "link=${link}" "-sEXPAT_INCLUDE=${expat.dev}/include" "-sEXPAT_LIBPATH=${expat.out}/lib" + + # TODO: make this unconditional + ] ++ optionals (hostPlatform != buildPlatform) [ + "address-model=${toString hostPlatform.parsed.cpu.bits}" + "architecture=${toString hostPlatform.parsed.cpu.family}" + "binary-format=${toString hostPlatform.parsed.kernel.execFormat.name}" + "target-os=${toString hostPlatform.parsed.kernel.name}" + + # adapted from table in boost manual + # https://www.boost.org/doc/libs/1_66_0/libs/context/doc/html/context/architectures.html + "abi=${if hostPlatform.parsed.cpu.family == "arm" then "aapcs" + else if hostPlatform.isWindows then "ms" + else if hostPlatform.isMips then "o32" + else "sysv"}" ] ++ optional (link != "static") "runtime-link=${runtime-link}" ++ optional (variant == "release") "debug-symbols=off" ++ optional (toolset != null) "toolset=${toolset}" ++ optional (mpi != null || hostPlatform != buildPlatform) "--user-config=user-config.jam" ++ optionals (hostPlatform.libc == "msvcrt") [ - "target-os=windows" "threadapi=win32" - "binary-format=pe" - "address-model=${toString hostPlatform.parsed.cpu.bits}" - "architecture=x86" ]); in |