Re: [PATCH v1 kbuild for-next 1/2] makefiles: add config option to force all cc warnings to errors

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

 



On 3/17/15 6:58 PM, Paul Bolle wrote:
On Tue, 2015-03-17 at 15:37 -0700, Jonathan Toppins wrote:
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
+config DEBUG_FORCE_CC_WARNINGS_TO_ERRORS
+	bool "Force cc warnings to errors"
+	default y

No way.

+	help
+	  Simply enables the gcc compiler option -Werror for the entire
+	  build. If a compilation unit cannot handle -Werror by fixing the
+	  warning then that unit must suppress the cc warning using
+	  cc-disable-warning for that compilation unit in the unit's makefile.
+	  .

(Why the dot?)

+	  This option is intended to be more in the developer's face and
+	  encourage effort of some kind to remove the compilation warning.
+	  .

(Dot?)

+	  If unsure say y.

Again, no way.

+
  endmenu # "Compiler options"

  config MAGIC_SYSRQ

Feel free to fix as many build warning as you can. I'd really appreciate
that. But my x86_64 build of v4.0-rc4 is _almost_ warning free. And
that's nice. And I find -Werror (and littering Makefiles with
cc-disable-warning) just to remove the few warnings I still see plain
silly. I'm sure the same holds for other people and their builds too.

Please note, I was not trying to imply using cc-disable-warning was a first resort option, sorry if it seemed like that. In fact in my opinion cc-disable-warning should almost never be used. Do you have a suggestion for better wording of this?

Some slight background on these patches, they were born out of the team here wanting to have a simple way of easily catching warnings during driver development. This seemed like the least cumbersome way. I understand if defaulting to yes is not advisable.

Will be happy to submit another patch defaulting to no and clean-up the Dots in the paragraphs. From the comments provided so far this approach would seem to address them, unless I am misunderstanding and in fact the general idea of compiling with -Werror is not wanted.

Appreciate the discussion.

-Jon
--
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