Fixing mingw-w64 builds. I can build simple C++ programs with gccCrossStageFinal.
I also add tests for hydra; let's see if it builds far. svn path=/nixpkgs/trunk/; revision=34232
This commit is contained in:
parent
e9186a03b9
commit
383b76df79
@ -11,6 +11,13 @@ stdenv.mkDerivation (rec {
|
|||||||
sha256 = "043jk6z90f9pxs9kfn6ckh2vlnbgcv6yfbp5ybahrj3z58dcijp5";
|
sha256 = "043jk6z90f9pxs9kfn6ckh2vlnbgcv6yfbp5ybahrj3z58dcijp5";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# I don't know what's that $host directory about, I put the
|
||||||
|
# files inside include as usual.
|
||||||
|
postInstall = ''
|
||||||
|
rmdir $out/include
|
||||||
|
mv $out/x86_64-w64-mingw32/* $out
|
||||||
|
rm -R $out/x86_64-w64-mingw32
|
||||||
|
'';
|
||||||
} //
|
} //
|
||||||
(if onlyHeaders then {
|
(if onlyHeaders then {
|
||||||
name = name + "-headers";
|
name = name + "-headers";
|
||||||
@ -18,13 +25,6 @@ stdenv.mkDerivation (rec {
|
|||||||
cd mingw-w64-headers
|
cd mingw-w64-headers
|
||||||
'';
|
'';
|
||||||
configureFlags = "--without-crt --host=x86_64-w64-mingw32";
|
configureFlags = "--without-crt --host=x86_64-w64-mingw32";
|
||||||
|
|
||||||
# I don't know what's that $host directory about, I put the
|
|
||||||
# files inside include as usual.
|
|
||||||
postInstall = ''
|
|
||||||
mv $out/x86_64-w64-mingw32/include/* $out/include
|
|
||||||
rm -R $out/x86_64-w64-mingw32
|
|
||||||
'';
|
|
||||||
} else {
|
} else {
|
||||||
buildInputs = [ gccCross binutilsCross ];
|
buildInputs = [ gccCross binutilsCross ];
|
||||||
|
|
||||||
|
@ -1852,9 +1852,9 @@ let
|
|||||||
|
|
||||||
gccCrossStageStatic = let
|
gccCrossStageStatic = let
|
||||||
isMingw = (stdenv.cross.libc == "msvcrt");
|
isMingw = (stdenv.cross.libc == "msvcrt");
|
||||||
isMingw64 = (stdenv.cross.libc == "msvcrt64");
|
isMingw64 = isMingw && stdenv.cross.config == "x86_64-w64-mingw32";
|
||||||
libcCross1 = if isMingw then windows.mingw_headers1 else
|
libcCross1 = if isMingw64 then windows.mingw_w64_headers else
|
||||||
if isMingw64 then windows.mingw_w64_headers else null;
|
if isMingw then windows.mingw_headers1 else null;
|
||||||
in
|
in
|
||||||
wrapGCCCross {
|
wrapGCCCross {
|
||||||
gcc = forceBuildDrv (lib.addMetaAttrs { platforms = []; } (
|
gcc = forceBuildDrv (lib.addMetaAttrs { platforms = []; } (
|
||||||
@ -3528,6 +3528,8 @@ let
|
|||||||
# We can choose:
|
# We can choose:
|
||||||
libcCrossChooser = name : if (name == "glibc") then glibcCross
|
libcCrossChooser = name : if (name == "glibc") then glibcCross
|
||||||
else if (name == "uclibc") then uclibcCross
|
else if (name == "uclibc") then uclibcCross
|
||||||
|
else if (name == "msvcrt" && stdenv.cross.config == "x86_64-w64-mingw32") then
|
||||||
|
windows.mingw_w64
|
||||||
else if (name == "msvcrt") then windows.mingw_headers3
|
else if (name == "msvcrt") then windows.mingw_headers3
|
||||||
else throw "Unknown libc";
|
else throw "Unknown libc";
|
||||||
|
|
||||||
|
@ -164,6 +164,29 @@ in {
|
|||||||
};
|
};
|
||||||
}) // (
|
}) // (
|
||||||
|
|
||||||
|
/* Test some cross builds on mingw-w64 */
|
||||||
|
let
|
||||||
|
crossSystem = {
|
||||||
|
# That's the triplet they use in the mingw-w64 docs,
|
||||||
|
# and it's relevant for nixpkgs conditions.
|
||||||
|
config = "x86_64-w64-mingw32";
|
||||||
|
arch = "x86_64"; # Irrelevant
|
||||||
|
libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
|
||||||
|
platform = {};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
crossMingwW64 = mapTestOnCross crossSystem {
|
||||||
|
coreutils.hostDrv = nativePlatforms;
|
||||||
|
boehmgc.hostDrv = nativePlatforms;
|
||||||
|
gmp.hostDrv = nativePlatforms;
|
||||||
|
guile_1_8.hostDrv = nativePlatforms;
|
||||||
|
libffi.hostDrv = nativePlatforms;
|
||||||
|
libtool.hostDrv = nativePlatforms;
|
||||||
|
libunistring.hostDrv = nativePlatforms;
|
||||||
|
windows.wxMSW.hostDrv = nativePlatforms;
|
||||||
|
};
|
||||||
|
}) // (
|
||||||
|
|
||||||
/* GNU aka. GNU/Hurd. */
|
/* GNU aka. GNU/Hurd. */
|
||||||
let
|
let
|
||||||
crossSystem = {
|
crossSystem = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user