summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-02-18 10:42:07 -0500
committerTom Rini <trini@konsulko.com>2020-02-24 12:50:47 -0500
commit36985b0b16b4e4b156d978d8ca68e556ca08a1e0 (patch)
tree37e8818eba98c61fdc9bb08f41d4e7e9b2a72321
parentff55446bd37f21e1627215532f0da39dc61c5323 (diff)
downloadu-boot-36985b0b16b4e4b156d978d8ca68e556ca08a1e0.tar.gz
kbuild: Re-sync DTC flag logic with v4.17
The way that we have been handling additional DTC warning flags hasn't matched the way the Linux Kernel does. Resync this logic with v4.17. Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--scripts/Makefile.extrawarn21
-rw-r--r--scripts/Makefile.lib16
2 files changed, 16 insertions, 21 deletions
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 1105c76be1..80231fbddf 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -56,25 +56,4 @@ endif
KBUILD_CFLAGS += $(warning)
-dtc-warning-2 += -Wnode_name_chars_strict
-dtc-warning-2 += -Wproperty_name_chars_strict
-
-dtc-warning := $(dtc-warning-$(findstring 1, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
-dtc-warning += $(dtc-warning-$(findstring 2, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
-dtc-warning += $(dtc-warning-$(findstring 3, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
-
-DTC_FLAGS += $(dtc-warning)
-
-else
-
-# Disable noisy checks by default
-DTC_FLAGS += -Wno-unit_address_vs_reg
-DTC_FLAGS += -Wno-simple_bus_reg
-DTC_FLAGS += -Wno-unit_address_format
-DTC_FLAGS += -Wno-pci_bridge
-DTC_FLAGS += -Wno-pci_device_bus_num
-DTC_FLAGS += -Wno-pci_device_reg
-DTC_FLAGS += -Wno-avoid_unnecessary_addr_size
-DTC_FLAGS += -Wno-alias_paths
-
endif
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 30f392fdfb..bfb5851e9b 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -274,6 +274,22 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
# DTC
# ---------------------------------------------------------------------------
+# Disable noisy checks by default
+ifeq ($(findstring 1,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
+DTC_FLAGS += -Wno-unit_address_vs_reg \
+ -Wno-unit_address_format \
+ -Wno-avoid_unnecessary_addr_size \
+ -Wno-alias_paths \
+ -Wno-pci_device_reg
+endif
+
+ifneq ($(findstring 2,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
+DTC_FLAGS += -Wnode_name_chars_strict \
+ -Wproperty_name_chars_strict
+endif
+
+DTC_FLAGS += $(DTC_FLAGS_$(basetarget))
+
# Generate an assembly file to wrap the output of the device tree compiler
quiet_cmd_dt_S_dtb= DTB $@
# Modified for U-Boot