diff options
author | aszlig <aszlig@redmoonstudios.org> | 2014-03-12 06:21:17 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2014-03-12 10:00:47 +0100 |
commit | 2d17335f6869f88e5bbcef4f1c7a3329e5860ccb (patch) | |
tree | 8ca7928e36b57f620b433989af21754e4660d4d0 /pkgs/build-support/gcc-cross-wrapper | |
parent | 8c053312b5633c0e180edff68335b3652cc5c6df (diff) |
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>
Diffstat (limited to 'pkgs/build-support/gcc-cross-wrapper')
-rw-r--r-- | pkgs/build-support/gcc-cross-wrapper/builder.sh | 4 | ||||
-rw-r--r-- | pkgs/build-support/gcc-cross-wrapper/default.nix | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/build-support/gcc-cross-wrapper/builder.sh b/pkgs/build-support/gcc-cross-wrapper/builder.sh index 5a5bd45a8f812..18d26b3e94519 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 b2e30be10ef70..d3494b83a87b8 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; |