Re: git: e858e20eec81 - main - devel/freebsd-gcc12: Use -stdlib=libc++ to use libc++.
Date: Sat, 05 Aug 2023 18:02:18 UTC
On 8/5/23 8:34 AM, Matthias Andree wrote: > Am 05.08.23 um 17:24 schrieb John Baldwin: >> The branch main has been updated by jhb: >> >> URL: https://cgit.FreeBSD.org/ports/commit/?id=e858e20eec8104648b25313b388e9f2532c980fb >> >> commit e858e20eec8104648b25313b388e9f2532c980fb >> Author: John Baldwin <jhb@FreeBSD.org> >> AuthorDate: 2023-08-05 15:24:11 +0000 >> Commit: John Baldwin <jhb@FreeBSD.org> >> CommitDate: 2023-08-05 15:24:11 +0000 >> >> devel/freebsd-gcc12: Use -stdlib=libc++ to use libc++. >> >> Instead of overriding the path and library name of libstdc++, set the >> path for libc++ and change the default of -stdlib= from libstdc++ to >> libc++. >> --- >> devel/freebsd-gcc12/Makefile | 8 ++++---- >> devel/freebsd-gcc12/files/patch-gcc-configure | 13 ------------- >> devel/freebsd-gcc12/files/patch-gcc_c-family_c.opt | 11 +++++++++++ >> devel/freebsd-gcc12/files/patch-gcc_cp_g++spec.cc | 11 +++++++++++ >> 4 files changed, 26 insertions(+), 17 deletions(-) >> >> diff --git a/devel/freebsd-gcc12/Makefile b/devel/freebsd-gcc12/Makefile >> index 677f60f8c5dd..e6ac2069852a 100644 >> --- a/devel/freebsd-gcc12/Makefile >> +++ b/devel/freebsd-gcc12/Makefile >> @@ -1,6 +1,6 @@ >> PORTNAME= gcc >> PORTVERSION= 12.2.0 >> -PORTREVISION= 8 >> +PORTREVISION= 9 >> CATEGORIES= devel >> MASTER_SITES= GCC >> PKGNAMEPREFIX= ${TARGETARCH}- >> @@ -53,7 +53,7 @@ CONFIGURE_ARGS+=--target=${GCC_TARGET} --disable-nls --enable-languages=c,c++ \ >> --with-pkgversion="FreeBSD Ports Collection for ${PKGNAMEPREFIX:C/-//g}" \ >> --with-system-zlib \ >> --without-zstd \ >> - --with-gxx-include-dir=/usr/include/c++/v1/ \ >> + --with-gxx-libcxx-include-dir=//usr/include/c++/v1 \ > > Are the double leading slashes intentional/necessary/harmless? Necessary due to the use of --with-sysroot=/ to enable use of --sysroot (used during buildworld/buildkernel). The configure script removes the sysroot from the include dir if it is a prefix. Without the double slashes this resulted in "usr/include/c++1/v1" as the path. However, that meant that when buildworld later used --sysroot ${WORLDTMP} that the compiler would not honor the --sysroot for C++ headers (since it only honors sysroot for include paths with a leading /). Without passing '--with-sysroot=/', GCC doesn't support --sysroot at all which buildworld/buildkernel require. -- John Baldwin