[PATCH] Add option to control compiler warnings for gcc

Jef Driesen jefdriesen at telenet.be
Thu Jan 8 07:32:30 PST 2015


On 2015-01-06 23:28, Anton Lundin wrote:
> This adds a configure option, --enable-gcc-compile-warnings which
> controls which CFLAGS to pass to gcc. It defaults to -Wall but can with
> the configure argument be turned to different levels.
> 
> Signed-off-by: Anton Lundin <glance at acc.umu.se>
> ---
> 
> I think i kinda over-did-it, but hey.
> 
> I had something quite close laying around from another project so i 
> picked
> the whole thingie.

You don't really need a new option to use specific CFLAGS (or others). 
Just pass them to the configure script (or make) directly:

./configure CFLAGS='...'

or

make CFLAGS='...'

I always build with -Wall -Wextra -pedantic using the first variant 
(which means I only have to set the right options once).

Jef


More information about the devel mailing list