]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
kbuild: turn of dtc unit address warnings by default
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 27 Feb 2017 06:24:45 +0000 (15:24 +0900)
committerTom Rini <trini@konsulko.com>
Thu, 9 Mar 2017 16:31:39 +0000 (11:31 -0500)
DTC 1.4.2 or later checks DT unit-address without reg property and
vice-versa, and generates lots of warnings.  Fixing DT files will
take for a while.  Until then, let's turn off the check unless
building with W=*.

Introduce a new helper dtc-option to check if the option is supported
in order to suppress warnings on older versions.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Makefile
scripts/Kbuild.include
scripts/Makefile.extrawarn

index 7cbb610351c04bde514be6fc4cc27db8b676b2fa..ac1746f77d08f6255274af0a8e91af97d08f0eef 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -371,7 +371,7 @@ export ARCH CPU BOARD VENDOR SOC CPUDIR BOARDDIR
 export CONFIG_SHELL HOSTCC HOSTCFLAGS HOSTLDFLAGS CROSS_COMPILE AS LD CC
 export CPP AR NM LDR STRIP OBJCOPY OBJDUMP
 export MAKE AWK PERL PYTHON
-export HOSTCXX HOSTCXXFLAGS DTC CHECK CHECKFLAGS
+export HOSTCXX HOSTCXXFLAGS CHECK CHECKFLAGS DTC DTC_FLAGS
 
 export KBUILD_CPPFLAGS NOSTDINC_FLAGS UBOOTINCLUDE OBJCOPYFLAGS LDFLAGS
 export KBUILD_CFLAGS KBUILD_AFLAGS
index 30e6e316ac1b2565f13436f2d81a2230e1fe5bfc..1b62aedb00877bb375bf265c4cd5d3c984342553 100644 (file)
@@ -172,6 +172,11 @@ ld-version = $(shell $(LD) --version | $(srctree)/scripts/ld-version.sh)
 # Usage:  $(call ld-ifversion, -ge, 22252, y)
 ld-ifversion = $(shell [ $(ld-version) $(1) $(2) ] && echo $(3) || echo $(4))
 
+# dtc-option
+# Usage:  DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg)
+dtc-option = $(call try-run,\
+       echo '/dts-v1/; / {};' | $(DTC) $(1),$(1),$(2))
+
 ######
 
 ###
index 6547e573574b0a1a03b325ddf878a8ae1275614f..7b2cffce520abe0959471f27d0995c90fb1cfdfe 100644 (file)
@@ -57,4 +57,10 @@ ifeq ("$(strip $(warning))","")
 endif
 
 KBUILD_CFLAGS += $(warning)
+
+else
+
+# Disable noisy checks by default
+DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg)
+
 endif