Re: git: 117c06cf3d56 - main - lang/gcc12-devel: Expose non-default -stdlib=libc++ support

From: Lorenzo Salvadore <phascolarctos_at_protonmail.ch>
Date: Sun, 21 Aug 2022 10:23:07 UTC
In the commit below I forgot the port revision bump (which was correctly specified in
the submitted patch). In this case it is not a big deal as the port is updated anyway
to a new version with the next commit (4dcf6bf2b23a8b25ae519b135045cdab290131b3), but
I will be more careful when updating the other gcc ports, especially when I do not
commit the patch together with a version update.

Lorenzo Salvadore


------- Original Message -------
On Sunday, August 21st, 2022 at 12:15, Lorenzo Salvadore <salvadore@FreeBSD.org> wrote:


> 
> 
> The branch main has been updated by salvadore:
> 
> URL: https://cgit.FreeBSD.org/ports/commit/?id=117c06cf3d5626ff5650342ed91c786759a6de1c
> 
> commit 117c06cf3d5626ff5650342ed91c786759a6de1c
> Author: Jan Beich jbeich@FreeBSD.org
> 
> AuthorDate: 2022-08-20 23:26:46 +0000
> Commit: Lorenzo Salvadore salvadore@FreeBSD.org
> 
> CommitDate: 2022-08-21 10:14:23 +0000
> 
> lang/gcc12-devel: Expose non-default -stdlib=libc++ support
> 
> Fix -stdlib=libc++ option which produced "error: unrecognized
> command-line option '-stdlib=libc++'".
> 
> PR: 265962
> Reported by: jbeich
> ---
> lang/gcc12-devel/Makefile | 1 +
> lang/gcc12-devel/files/patch-libcxxrt | 18 ++++++++++++++++++
> 2 files changed, 19 insertions(+)
> 
> diff --git a/lang/gcc12-devel/Makefile b/lang/gcc12-devel/Makefile
> index 96d5af78e537..29a7a52ebfc0 100644
> --- a/lang/gcc12-devel/Makefile
> +++ b/lang/gcc12-devel/Makefile
> @@ -104,6 +104,7 @@ CONFIGURE_ARGS+=--disable-nls \
> --with-as=${LOCALBASE}/bin/as \
> --with-gmp=${LOCALBASE} \
> --with-gxx-include-dir=${TARGLIB}/include/c++/ \
> + --with-gxx-libcxx-include-dir=/usr/include/c++/v1 \
> --with-ld=${LOCALBASE}/bin/ld \
> ${ICONV_CONFIGURE_ARG} \
> --with-pkgversion="FreeBSD Ports Collection" \
> diff --git a/lang/gcc12-devel/files/patch-libcxxrt b/lang/gcc12-devel/files/patch-libcxxrt
> new file mode 100644
> index 000000000000..3ff20d8a01d9
> --- /dev/null
> +++ b/lang/gcc12-devel/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.cc.orig 2022-08-06 22:32:19 UTC
> ++++ gcc/cp/g++spec.cc
> +@@ -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