forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gcc6: don’t link libstdc++ to CoreFoundation
Using flat namespaces causes libstdc++ to link CoreFoundation, but that fails after NixOS#265102. Since CoreFoundation is not actually needed, disable flat namespaces to avoid linking it unnecessarily. Disabling flat namespaces matches the behavior of newer versions of libstdc++ (GCC 7+) when building for newer Darwin hosts (10.5+).
- Loading branch information
1 parent
6bccf90
commit 647b2db
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
pkgs/development/compilers/gcc/patches/6/libstdc++-disable-flat_namespace.patch
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,26 @@ | ||
Backported from GCC 7. | ||
|
||
diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host | ||
index 304a7f5aff6..d1a189d93d0 100644 | ||
--- a/libstdc++-v3/configure.host | ||
+++ b/libstdc++-v3/configure.host | ||
@@ -234,7 +234,7 @@ case "${host_os}" in | ||
os_include_dir="os/newlib" | ||
OPT_LDFLAGS="${OPT_LDFLAGS} \$(lt_host_flags)" | ||
;; | ||
- darwin | darwin[1-7] | darwin[1-7].*) | ||
+ darwin[1-7] | darwin[1-7].*) | ||
# On Darwin, performance is improved if libstdc++ is single-module. | ||
# Up to at least 10.3.7, -flat_namespace is required for proper | ||
# treatment of coalesced symbols. | ||
@@ -252,6 +252,10 @@ case "${host_os}" in | ||
esac | ||
os_include_dir="os/bsd/darwin" | ||
;; | ||
+ darwin*) | ||
+ # Post Darwin8, defaults should be sufficient. | ||
+ os_include_dir="os/bsd/darwin" | ||
+ ;; | ||
*djgpp*) # leading * picks up "msdosdjgpp" | ||
os_include_dir="os/djgpp" | ||
error_constants_dir="os/djgpp" |
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