diff options
author | aszlig <aszlig@redmoonstudios.org> | 2015-04-12 12:01:07 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-04-23 10:52:07 +0200 |
commit | fb74d901d76d393be28b19651f5368b89db93d16 (patch) | |
tree | 95ac52f965b339ec904270b228223e0619a9f982 /pkgs/development/libraries/boost/generic.nix | |
parent | 5f0f48c08b3c718d898b2f00b7b48a5bf6d3eb95 (diff) | |
download | nixpkgs-fb74d901d76d393be28b19651f5368b89db93d16.tar nixpkgs-fb74d901d76d393be28b19651f5368b89db93d16.tar.gz nixpkgs-fb74d901d76d393be28b19651f5368b89db93d16.tar.bz2 nixpkgs-fb74d901d76d393be28b19651f5368b89db93d16.tar.lz nixpkgs-fb74d901d76d393be28b19651f5368b89db93d16.tar.xz nixpkgs-fb74d901d76d393be28b19651f5368b89db93d16.tar.zst nixpkgs-fb74d901d76d393be28b19651f5368b89db93d16.zip |
boost: Add patch for mingw to use gas instead.
The upstream sources only compile with masm, so we need to add a patch that translates the masm sources to GNU assembler. Unfortunately, this means, that "generic.nix" is no longer very much generic, but the versions we currently include work fine with the patch. Unfortunately, the boost build still doesn't finish, but we're getting there soon enough. The patch is from https://svn.boost.org/trac/boost/ticket/7262 and following the discussion it seems that the upstream authors are unwilling to add a gas version for the Windows platform. So in the long term we might need to find a better solution to that, like for example using Wine to run MASM. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/development/libraries/boost/generic.nix')
-rw-r--r-- | pkgs/development/libraries/boost/generic.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 51d3c911d67..561f65afa51 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -1,4 +1,4 @@ -{ stdenv, icu, expat, zlib, bzip2, python, fixDarwinDylibNames +{ stdenv, fetchurl, icu, expat, zlib, bzip2, python, fixDarwinDylibNames , toolset ? if stdenv.cc.isClang then "clang" else null , enableRelease ? true , enableDebug ? false @@ -79,6 +79,9 @@ let ] ++ optionals stdenv.isCrossWin [ "target-os=windows" "threadapi=win32" + "binary-format=pe" + "address-model=${if stdenv.isCross64 then "64" else "32"}" + "architecture=x86" ]; crossB2Args = concatStringsSep " " (genericB2Flags ++ crossB2Flags); @@ -180,5 +183,13 @@ stdenv.mkDerivation { buildPhase = builder crossB2Args; installPhase = installer crossB2Args; postFixup = fixup; + } // optionalAttrs stdenv.isCrossWin { + patches = fetchurl { + url = "https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/" + + "boost-mingw.patch"; + sha256 = "0s32kwll66k50w6r5np1y5g907b7lcpsjhfgr7rsw7q5syhzddyj"; + }; + + patchFlags = "-p0"; }; } |