From 65fe81d73e72f1303557c9809a73716cc7fcd77b Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sat, 20 Aug 2022 16:06:02 +0000 Subject: lang/gcc11: Expose non-default -stdlib=libc++ support Fix -stdlib=libc++ option which produced "error: unrecognized command-line option '-stdlib=libc++'". PR: 265962 Approved by: salvadore (maintainer) Exp-run by: antoine (via bug 265964) --- lang/gcc11/files/patch-libcxxrt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lang/gcc11/files/patch-libcxxrt (limited to 'lang/gcc11/files/patch-libcxxrt') diff --git a/lang/gcc11/files/patch-libcxxrt b/lang/gcc11/files/patch-libcxxrt new file mode 100644 index 000000000000..4e8a5c34305f --- /dev/null +++ b/lang/gcc11/files/patch-libcxxrt @@ -0,0 +1,18 @@ +libc++ on FreeBSD always uses PathScale libcxxrt and cannot change to +LLVM libc++abi without breaking backward compatibility. Besides, mixing +different C++ ABIs is not supported unless subset via DT_FILTER. + +https://github.com/llvm/llvm-project/commit/35479ffb1251 +https://github.com/freebsd/freebsd-src/commit/cf56074e5271 + +--- gcc/cp/g++spec.c.orig 2022-04-21 07:58:53 UTC ++++ gcc/cp/g++spec.c +@@ -60,7 +60,7 @@ along with GCC; see the file COPYING3. If not see + #endif + + #ifndef LIBCXXABI +-#define LIBCXXABI "c++abi" ++#define LIBCXXABI "cxxrt" + #endif + #ifndef LIBCXXABI_PROFILE + #define LIBCXXABI_PROFILE LIBCXXABI -- cgit v1.2.3