-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
c7e0fbc
commit 8610a34
Showing
6 changed files
with
39 additions
and
4 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
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{stdenv, darwin}: | ||
|
||
/* | ||
* This is needed to build GCC on Darwin. | ||
* | ||
* These are the collection of headers that would normally be available under | ||
* /usr/include in OS X machines with command line tools installed. They need | ||
* to be in one folder for gcc to use them correctly. | ||
*/ | ||
|
||
stdenv.mkDerivation { | ||
name = "darwin-usr-include"; | ||
buildInputs = [ darwin.CF stdenv.libc ]; | ||
buildCommand = '' | ||
mkdir -p $out | ||
cd $out | ||
ln -sf ${stdenv.libc}/include/* . | ||
mkdir CoreFoundation | ||
ln -sf ${darwin.CF}/Library/Frameworks/CoreFoundation.framework/Headers/* CoreFoundation | ||
''; | ||
} |
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