[Mesa-dev] testing for certain compiler options does not work

Ian Romanick idr at freedesktop.org
Mon Dec 11 18:21:08 UTC 2017


On 12/07/2017 02:15 AM, Marc Dietrich wrote:
> Hi Ian,
> 
> Am Mittwoch, 6. Dezember 2017, 21:21:53 CET schrieb Ian Romanick:
>> On 11/29/2017 08:16 AM, Marc Dietrich wrote:
>>> Hi,
>>>
>>> just found that my gcc 'gcc (SUSE Linux) 7.2.1 20171020 [gcc-7-branch
>>> revision 253932]' does not warn when using the negative form of
>>> unsupported warning options. So all the configure tests for such options
>>> erroneously succeed, e.g:
>>>
>>> gcc -Wno-bob test.c # works fine
>>>
>>> gcc -Walice test.c # warns for unsupported compiler option
>>>
>>> Maybe gcc bug or intended behaviour, maybe only unique to my version?
>>
>> At least 6.4.1 does not have this problem, but our checks must be broken
>> in a different way.  I see piles of
> 
> I just found that this is not a gcc bug but a feature (since 4.4), so this 
> should also happen with your compiler:
> 
> https://gcc.gnu.org/wiki/FAQ#wnowarning
> 
>>
>> cc1: warning: unrecognized command line option ‘-Wno-initializer-
> overrides’
> 
> this should not happen, because this is the clang option which fails with gcc. 
> Is this with meson or autotools? Are you sure you applied the patch? I tested 
> it with both, gcc and clang and it works file here.

This was without your patch.  I didn't test your patch. :)  To answer
the other question, I've recently been seeing this with meson, but I
believe I also saw it with autotools.

>> This probably explains why I see piles of
>>
>> cc1: warning: unrecognized command line option ‘-Wno-initializer-
> overrides’
>>
>> in my builds.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171211/aad214d2/attachment.sig>


More information about the mesa-dev mailing list