[PATCH] Fix UBSAN bootstrap
Nathan Sidwell
nathan@acm.org
Mon Jan 11 12:58:08 GMT 2021
On 1/11/21 5:38 AM, Jakub Jelinek wrote:
> On Mon, Jan 11, 2021 at 11:26:42AM +0100, Martin Liška wrote:
>> Problem here was that GCC-related options are not applied in stage2 (and later stages).
>> It's caused by fact that CXX is xg++ in stage2 (and later stages).
>> Fixed with the following patch.
>>
>> Ready to be installed?
>> Thanks,
>> Martin
>>
>> libcody/ChangeLog:
>>
>> PR bootstrap/98414
>> * Makefile.in: In stage2 in UBSAN bootstrap the CXX is called
>> xg++, so findstring g++ should be used instead of exact string
>> comparison.
>
> I think better would be to follow gcc/{configure*,Make*} practice and don't
> judge compilers based on names, but on what they actually are and test
> perhaps not each individual flag separately, but their whole sets together.
Just so you know, it checks the name, because Clang identifies as GCC,
but can be insufficiently GCC-like at times (not here though).
I think replacing more bits with libcpp configure goup is probably the
better.
nathan
--
Nathan Sidwell
More information about the Gcc-patches
mailing list