gcc-5: Fix build on darwin

This commit is contained in:
Shea Levy 2015-05-10 18:06:29 -07:00
parent aa75bb25d8
commit d983875362

View File

@ -33,6 +33,7 @@
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true , stripped ? true
, gnused ? null , gnused ? null
, binutils ? null
}: }:
assert langJava -> zip != null && unzip != null assert langJava -> zip != null && unzip != null
@ -47,6 +48,9 @@ assert libelf != null -> zlib != null;
# Make sure we get GNU sed. # Make sure we get GNU sed.
assert stdenv.isDarwin -> gnused != null; assert stdenv.isDarwin -> gnused != null;
# Need c++filt on darwin
assert stdenv.isDarwin -> binutils != null;
# The go frontend is written in c++ # The go frontend is written in c++
assert langGo -> langCC; assert langGo -> langCC;
@ -285,6 +289,7 @@ stdenv.mkDerivation ({
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with # 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. # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
++ (optional stdenv.isDarwin gnused) ++ (optional stdenv.isDarwin gnused)
++ (optional stdenv.isDarwin binutils)
; ;
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl"; NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl";