Merge 'mingw-w64' and 'darwin' into cross-win-osx.

Both branches have quite a lot in common, so it's time for a merge and
do the cleanups with respect to both implementations and also generalize
both implementations as much as possible.

This also closes #1876.

Conflicts:
	pkgs/development/interpreters/lua-5/5.2.nix
	pkgs/development/libraries/SDL/default.nix
	pkgs/development/libraries/glew/default.nix
	pkgs/top-level/all-packages.nix
This commit is contained in:
aszlig
2014-03-12 10:16:51 +01:00
33 changed files with 487 additions and 119 deletions

View File

@@ -26,6 +26,10 @@ if test -z "$nativeLibc"; then
fi
fi
if [ -n "$osxMinVersion" ]; then
cflagsCompile="$cflagsCompile -mmacosx-version-min=$osxMinVersion"
fi
echo "$cflagsCompile -B$libc/lib/ -idirafter $libc/include -idirafter $gcc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags
echo "-L$libc/lib -rpath $libc/lib -rpath-link $libc/lib" > $out/nix-support/libc-ldflags

View File

@@ -46,6 +46,7 @@ stdenv.mkDerivation {
addFlags = ./add-flags;
inherit nativeTools nativeLibc nativePrefix gcc libc binutils;
crossConfig = if cross != null then cross.config else null;
osxMinVersion = cross.osxMinVersion or null;
gccLibs = if gcc != null then gccLibs else null;
name = chosenName;
langC = if nativeTools then true else gcc.langC;

View File

@@ -70,11 +70,16 @@ fi
if test "$dontSetConfigureCross" != "1"; then
configureFlags="$configureFlags --build=$system --host=$crossConfig"
# This is because -print-prog-name tries to search FHS paths.
configureFlags="$configureFlags LD=$crossConfig-ld"
fi
# Disabling the tests when cross compiling, as usually the tests are meant for
# native compilations.
doCheck=""
# Don't strip foreign binaries with native "strip" tool.
dontStrip=1
# Add the output as an rpath.
if test "$NIX_NO_SELF_RPATH" != "1"; then
export NIX_CROSS_LDFLAGS="-rpath $out/lib -rpath-link $out/lib $NIX_CROSS_LDFLAGS"