3
0
Fork 0
forked from mirrors/nixpkgs

gcc-cross-wrapper: Allow to pass US X min version.

This allows to pass a new attribute osxMinVersion to crossSystem, which
specifies the minimum Mac OS X version you want to be compatible to.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2014-03-12 06:21:17 +01:00
parent 8c053312b5
commit 2d17335f68
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961
2 changed files with 5 additions and 0 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;