X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=scripts%2FMakefile.extrawarn;h=90dc149df3d9a5b625595b5177c8912309666789;hb=0e689a61929bdf15423e868bc242c1268bda7db9;hp=0ec0d24b1c78ef79e0370c4f0863472d9681930c;hpb=bd5053ffa5b8162257537bdb79ba829372423096;p=u-boot diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index 0ec0d24b1c..90dc149df3 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -9,6 +9,9 @@ # $(call cc-option, -W...) handles gcc -W.. options which # are not supported by all versions of the compiler # ========================================================================== +# +# SPDX-License-Identifier: GPL-2.0 +# ifeq ("$(origin W)", "command line") export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W) @@ -54,4 +57,24 @@ ifeq ("$(strip $(warning))","") endif KBUILD_CFLAGS += $(warning) + +dtc-warning-2 += $(call dtc-option,-Wnode_name_chars_strict) +dtc-warning-2 += $(call dtc-option,-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 += $(call dtc-option,-Wno-unit_address_vs_reg) +DTC_FLAGS += $(call dtc-option,-Wno-simple_bus_reg) +DTC_FLAGS += $(call dtc-option,-Wno-unit_address_format) +DTC_FLAGS += $(call dtc-option,-Wno-pci_bridge) +DTC_FLAGS += $(call dtc-option,-Wno-pci_device_bus_num) +DTC_FLAGS += $(call dtc-option,-Wno-pci_device_reg) + endif