]> git.ipfire.org Git - thirdparty/kernel/stable.git/blobdiff - init/Kconfig
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
[thirdparty/kernel/stable.git] / init / Kconfig
index 811641cc81e8dfb5f070d44dab7d9451bbbfc38e..4592bf7997c000dc7a5537ca4c28b308713b9d65 100644 (file)
@@ -13,7 +13,7 @@ config CC_IS_GCC
 
 config GCC_VERSION
        int
-       default $(shell,$(srctree)/scripts/gcc-version.sh -p $(CC) | sed 's/^0*//') if CC_IS_GCC
+       default $(shell,$(srctree)/scripts/gcc-version.sh $(CC)) if CC_IS_GCC
        default 0
 
 config CC_IS_CLANG
@@ -26,6 +26,22 @@ config CLANG_VERSION
 config CC_HAS_ASM_GOTO
        def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC))
 
+config CC_HAS_WARN_MAYBE_UNINITIALIZED
+       def_bool $(cc-option,-Wmaybe-uninitialized)
+       help
+         GCC >= 4.7 supports this option.
+
+config CC_DISABLE_WARN_MAYBE_UNINITIALIZED
+       bool
+       depends on CC_HAS_WARN_MAYBE_UNINITIALIZED
+       default CC_IS_GCC && GCC_VERSION < 40900  # unreliable for GCC < 4.9
+       help
+         GCC's -Wmaybe-uninitialized is not reliable by definition.
+         Lots of false positive warnings are produced in some cases.
+
+         If this option is enabled, -Wno-maybe-uninitialzed is passed
+         to the compiler to suppress maybe-uninitialized warnings.
+
 config CONSTRUCTORS
        bool
        depends on !UML
@@ -1114,6 +1130,7 @@ config CC_OPTIMIZE_FOR_PERFORMANCE
 
 config CC_OPTIMIZE_FOR_SIZE
        bool "Optimize for size"
+       imply CC_DISABLE_WARN_MAYBE_UNINITIALIZED  # avoid false positives
        help
          Enabling this option will pass "-Os" instead of "-O2" to
          your compiler resulting in a smaller kernel.