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>
This commit is contained in:
aszlig 2015-04-12 12:01:07 +02:00 committed by Vladimír Čunát
parent 5f0f48c08b
commit fb74d901d7

View File

@ -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";
};
}