From fb74d901d76d393be28b19651f5368b89db93d16 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 12 Apr 2015 12:01:07 +0200 Subject: [PATCH] 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 --- pkgs/development/libraries/boost/generic.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 51d3c911d677..561f65afa513 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"; }; }