From 8610a344740776639f7161e5a47196418695d6fe Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 14 Sep 2016 22:19:28 -0500 Subject: gcc: use special native system headers for darwin Darwin systems need to be able to find CoreFoundation headers as well as libc headers. Somehow, gcc doesn't accept any "framework" parameters that would normally be used to include CoreFoundation in this situation. HACK: Instead, this adds a derivation that combines the two. The result works but probably not a good long term solution. ALTERNATIVES: Maybe sending patches in to GCC to allow "native-system-framework" configure flag to get this found. --- pkgs/development/compilers/gcc/6/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkgs/development/compilers/gcc/6') diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index b33437ee868c..530d835620af 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -35,6 +35,7 @@ , gnused ? null , binutils ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places +, darwin ? null }: assert langJava -> zip != null && unzip != null @@ -361,7 +362,9 @@ stdenv.mkDerivation ({ ) } ${if cross == null - then " --with-native-system-header-dir=${getDev stdenv.libc}/include" + then if stdenv.isDarwin + then " --with-native-system-header-dir=${darwin.usr-include}" + else " --with-native-system-header-dir=${getDev stdenv.libc}/include" else ""} ${if langAda then " --enable-libada" else ""} ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} -- cgit 1.4.1