commit: e725aa5030c89bec2b8883784d725568250d19b8 Author: Marco Rebhan <me <AT> dblsaiko <DOT> net> AuthorDate: Mon Feb 10 19:54:17 2025 +0000 Commit: Marco Rebhan <me <AT> dblsaiko <DOT> net> CommitDate: Mon Feb 10 23:46:30 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e725aa50
dev-lang/swift: Always use libstdc++ when building Swift 5 Closes: https://bugs.gentoo.org/949266 Signed-off-by: Marco Rebhan <me <AT> dblsaiko.net> dev-lang/swift/swift-5.10.1-r3.ebuild | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dev-lang/swift/swift-5.10.1-r3.ebuild b/dev-lang/swift/swift-5.10.1-r3.ebuild index 09858bfb7..9bf1f8049 100644 --- a/dev-lang/swift/swift-5.10.1-r3.ebuild +++ b/dev-lang/swift/swift-5.10.1-r3.ebuild @@ -196,6 +196,15 @@ src_compile() { '-DSWIFT_USE_LINKER=lld', '-DLLVM_USE_LINKER=lld', + # Bug 949266 + # Building Swift with llvm-core/clang-common[default-libcxx] fails + # with missing symbol errors due to some libraries getting linked + # against libc++ and some against libstdc++, and when the Swift llvm is + # told to link against libc++ (via -DCLANG_DEFAULT_CXX_STDLIB=libc++), + # Swift fails to load the c++ symbols later in the build. Therefore, + # unconditionally force libstdc++. + '-DCMAKE_CXX_FLAGS=-stdlib=libstdc++', + # We don't need to build any test code or test executables, which Swift # (and some components) does by default. '-DBUILD_TESTING:BOOL=NO',