kernel: introduce KERNEL_WERROR config option
[openwrt/staging/dangole.git] / config / Config-kernel.in
index 7de0d17b5eaa58ceab885f4a931dc4acd118272c..a770a9d797371dd128fab7cfb4aa7430aebb6bd3 100644 (file)
@@ -1343,3 +1343,19 @@ config KERNEL_UBIFS_FS_SECURITY
 
 config KERNEL_JFFS2_FS_SECURITY
        bool "JFFS2 Security Labels"
+
+config KERNEL_WERROR
+       bool "Compile the kernel with warnings as errors"
+       default BUILDBOT
+       default y if GCC_USE_VERSION_12
+       help
+         A kernel build should not cause any compiler warnings, and this
+         enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
+         to enforce that rule by default. Certain warnings from other tools
+         such as the linker may be upgraded to errors with this option as
+         well.
+
+         However, if you have a new (or very old) compiler or linker with odd
+         and unusual warnings, or you have some architecture with problems,
+         you may need to disable this config option in order to
+         successfully build the kernel.