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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user