kbuild: turn of dtc unit address warnings by default

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>
This commit is contained in:
Masahiro Yamada
2017-02-27 15:24:45 +09:00
committed by Tom Rini
parent 0574f786d3
commit 4b83f0d98a
3 changed files with 12 additions and 1 deletions

View 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