diff options
author | aszlig <aszlig@redmoonstudios.org> | 2014-04-21 10:00:35 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2014-04-21 10:00:35 +0200 |
commit | 625d7b9043be673a8df33cc842ec5032d7705c06 (patch) | |
tree | 38777f48f2bb7b403b3e9f148000d0ffa8026cde /pkgs/build-support | |
parent | cdd1c9caa5d2a6eb184ec159bcfde3ac9745c56d (diff) | |
parent | 2d3376e84e4a24ca10480a9ade972db1e5c54e9f (diff) | |
download | nixlib-625d7b9043be673a8df33cc842ec5032d7705c06.tar nixlib-625d7b9043be673a8df33cc842ec5032d7705c06.tar.gz nixlib-625d7b9043be673a8df33cc842ec5032d7705c06.tar.bz2 nixlib-625d7b9043be673a8df33cc842ec5032d7705c06.tar.lz nixlib-625d7b9043be673a8df33cc842ec5032d7705c06.tar.xz nixlib-625d7b9043be673a8df33cc842ec5032d7705c06.tar.zst nixlib-625d7b9043be673a8df33cc842ec5032d7705c06.zip |
Merge pull request #1928 from 'cross-win-osx'.
This includes a lot of fixes for cross-building to Windows and Mac OS X and could possibly fix things even for non-cross-builds, like for example OpenSSL on Windows. The main reason for merging this in 14.04 already is that we already have runInWindowsVM in master and it doesn't work until we actually cross-build Cygwin's setup binary as the upstream version is a fast moving target which gets _overwritten_ on every new release. Conflicts: pkgs/top-level/all-packages.nix
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/gcc-cross-wrapper/builder.sh | 4 | ||||
-rw-r--r-- | pkgs/build-support/gcc-cross-wrapper/default.nix | 1 | ||||
-rw-r--r-- | pkgs/build-support/gcc-cross-wrapper/setup-hook.sh | 3 |
3 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/build-support/gcc-cross-wrapper/builder.sh b/pkgs/build-support/gcc-cross-wrapper/builder.sh index 2dfa315d168f..1d7d1046d367 100644 --- a/pkgs/build-support/gcc-cross-wrapper/builder.sh +++ b/pkgs/build-support/gcc-cross-wrapper/builder.sh @@ -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 diff --git a/pkgs/build-support/gcc-cross-wrapper/default.nix b/pkgs/build-support/gcc-cross-wrapper/default.nix index b2e30be10ef7..d3494b83a87b 100644 --- a/pkgs/build-support/gcc-cross-wrapper/default.nix +++ b/pkgs/build-support/gcc-cross-wrapper/default.nix @@ -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; diff --git a/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh b/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh index a7be09283ee0..433d36ced434 100644 --- a/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh +++ b/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh @@ -75,6 +75,9 @@ fi # 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" |