Re: [PATCH -v5] kbuild: Add extra gcc checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Another, related, very nice kbuild feature would be to allow for arch maintainers to 
> mark certain files as "should only build fine without warnings" - i.e. -Werror 
> should be the default. There would be a Kconfig feature to opt out of this, 
> CONFIG_CC_IGNORE_WARNINGS=y or so. This would allow for people to still build the 
> kernel with old (or buggy) versions of GCC.

To add -Werror for all files conditionally you can do:

    ccflags-$(CONFIG_WERROR) += -Werror

For individual files we can then drop -Werror like this:

    CFLAGS_REMOVE_foobar.o := -Werror

So it should be doable with the existing infrastructure.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux