Build portability: enable or disable warnings

Andrew Haley aph at redhat.com
Tue May 17 09:15:30 UTC 2011


On 17/05/11 06:53, Erik Trimble wrote:
> On 5/16/2011 12:38 PM, Andrew Haley wrote:
>> On 05/16/2011 07:59 PM, Dmitry Samersoff wrote:
>>> Andrew,
>>>
>>> On 2011-05-16 21:12, Andrew Haley wrote:
>>>> On 05/16/2011 05:50 PM, Dmitry Samersoff wrote:
>>>>> Andrew,
>>>>>
>>>>> I guess we can add to build system something like
>>>>>
>>>>> ALT_COMPILER_FLAGS
>>>>>
>>>>> and turn on all warnings and -Werror by default.
>>>>>
>>>>> Having zero-warning build is good practice and it's not too costly.
>>>> It'd drive you mad.  gcc's -Wall is really not suitable to be enabled
>>>> by default; it was never intended for that.
>>> OK.
>>>
>>>    But in this case we have no reliable way to deal with "semi-crazy
>>> distros" as all our attempts to disable all but some important  warnings
>>> could be blocked by theirs patches.
>> No: their patches don't force anything, only changing the default.
>> The user's choice is honoured.
> 
> Is there any way to invoke gcc with some option that says "ignore all 
> built-in options" ?
> 
> e.g.    gcc -Wignore-everything-built-in
> 
> and not just override things one at a time?

I don't think so.

I don't think we're going to find a general solution for this.  My
suggestion is to have a look at what flags Debian and Gentoo force
and decide whether we're going to turn them on or off.  If we can
agree that this is the right thing to do, I'll work on a patch.

Andrew.



More information about the build-dev mailing list