Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Aug 2023 11:02:18 -0700
From:      John Baldwin <jhb@FreeBSD.org>
To:        Matthias Andree <mandree@FreeBSD.org>, ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   Re: git: e858e20eec81 - main - devel/freebsd-gcc12: Use -stdlib=libc++ to use libc++.
Message-ID:  <3c0d9f6d-eb2b-741f-c719-7565c8d00450@FreeBSD.org>
In-Reply-To: <18d7e6c0-7163-8b96-aec7-675592e9fb55@FreeBSD.org>
References:  <202308051524.375FObmR026375@gitrepo.freebsd.org> <18d7e6c0-7163-8b96-aec7-675592e9fb55@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3c0d9f6d-eb2b-741f-c719-7565c8d00450>