-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jude Taylor
committed
Jul 31, 2015
1 parent
7024b4d
commit 4a495cf
Showing
3 changed files
with
18 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ | |
, gnat ? null | ||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd | ||
, stripped ? true | ||
, gnused ? null | ||
, CF ? null | ||
}: | ||
|
||
assert langJava -> zip != null && unzip != null | ||
|
@@ -47,8 +47,8 @@ assert cloog != null -> isl != null; | |
# LTO needs libelf and zlib. | ||
assert libelf != null -> zlib != null; | ||
|
||
# Make sure we get GNU sed. | ||
assert stdenv.isDarwin -> gnused != null; | ||
# Make sure we get CoreFoundation | ||
assert stdenv.isDarwin -> CF != null; | ||
|
||
# The go frontend is written in c++ | ||
assert langGo -> langCC; | ||
|
@@ -290,10 +290,6 @@ stdenv.mkDerivation ({ | |
++ (optionals (cross != null) [binutilsCross]) | ||
++ (optionals langAda [gnatboot]) | ||
++ (optionals langVhdl [gnat]) | ||
|
||
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with | ||
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. | ||
++ (optional stdenv.isDarwin gnused) | ||
; | ||
|
||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl"; | ||
|
@@ -304,14 +300,11 @@ stdenv.mkDerivation ({ | |
export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" | ||
export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" | ||
'' + stdenv.lib.optionalString stdenv.isDarwin '' | ||
if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then | ||
configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include) | ||
makeFlagsArray+=( \ | ||
CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \ | ||
CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ | ||
FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ | ||
) | ||
fi | ||
configureFlagsArray+=( | ||
--with-sysroot="${stdenv.libc}" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
edolstra
Member
|
||
--with-native-system-header-dir=/include | ||
CFLAGS_FOR_BUILD= | ||
) | ||
''; | ||
|
||
dontDisableStatic = true; | ||
|
@@ -480,10 +473,10 @@ stdenv.mkDerivation ({ | |
++ optionals javaAwtGtk [ gmp mpfr ] | ||
++ optional (libpthread != null) libpthread))); | ||
|
||
EXTRA_TARGET_CFLAGS = | ||
if cross != null && libcCross != null | ||
extraFlags = | ||
(if cross != null && libcCross != null | ||
then "-idirafter ${libcCross}/include" | ||
else null; | ||
else "") + optionalString stdenv.isDarwin " -F${CF}/Library/Frameworks"; | ||
|
||
EXTRA_TARGET_LDFLAGS = | ||
if cross != null && libcCross != null | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This line breaks tarball evaluation (on darwin). Perhaps you meant
stdenv.cc.libc
?