Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc6: don’t link libstdc++ to CoreFoundation #267773

Merged
1 commit merged into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
3 changes: 3 additions & 0 deletions pkgs/development/compilers/gcc/patches/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ in
# This patch can be dropped should darwin.cctools-llvm ever implement support.
++ optional (!atLeast7 && hostPlatform.isDarwin && lib.versionAtLeast (lib.getVersion stdenv.cc) "12") ./4.9/darwin-clang-as.patch

# Building libstdc++ with flat namespaces results in trying to link CoreFoundation, which
# defaults to the impure, system location and causes the build to fail.
++ optional (is6 && hostPlatform.isDarwin) ./6/libstdc++-disable-flat_namespace.patch

## gcc 4.9 and older ##############################################################################

Expand Down