Merge tag 'kconfig-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
[sfrench/cifs-2.6.git] / scripts / Makefile.lib
index 5ff2761e973d27ad9868b6d6db12230977467564..5fdc1a19b02c02e8ad5c6353585b6deb09101c14 100644 (file)
@@ -274,7 +274,7 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
 DTC ?= $(objtree)/scripts/dtc/dtc
 
 # Disable noisy checks by default
-ifeq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),)
+ifeq ($(findstring 1,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
 DTC_FLAGS += -Wno-unit_address_vs_reg \
        -Wno-simple_bus_reg \
        -Wno-unit_address_format \
@@ -283,7 +283,7 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \
        -Wno-pci_device_reg
 endif
 
-ifeq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),2)
+ifneq ($(findstring 2,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
 DTC_FLAGS += -Wnode_name_chars_strict \
        -Wproperty_name_chars_strict
 endif