Merge tag 'hardening-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees...
[platform/kernel/linux-starfive.git] / init / Kconfig
index e1938e3..7e5c3dd 100644 (file)
@@ -159,10 +159,12 @@ config WERROR
        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.
+         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 with odd and
-         unusual warnings, or you have some architecture with problems,
+         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.
 
@@ -1454,6 +1456,13 @@ config LD_ORPHAN_WARN
        def_bool y
        depends on ARCH_WANT_LD_ORPHAN_WARN
        depends on $(ld-option,--orphan-handling=warn)
+       depends on $(ld-option,--orphan-handling=error)
+
+config LD_ORPHAN_WARN_LEVEL
+        string
+        depends on LD_ORPHAN_WARN
+        default "error" if WERROR
+        default "warn"
 
 config SYSCTL
        bool