FROMLIST: kbuild: Add dtc flag test
Host dtc may not support the same flags as kernel's copy of dtc. Test if dtc supports each flag when the dtc comes from host. Bug: 162811113 Link: https://lore.kernel.org/linux-devicetree/1596650328-14869-1-git-send-email-eberman@codeaurora.org/ Change-Id: Iab4e95c7100817c8b4ad40dcaafa6e6c29a85163 Signed-off-by: Elliot Berman <eberman@codeaurora.org>
This commit is contained in:
committed by
Steve Muckle
parent
3f4938108a
commit
47b5470fd1
@@ -274,25 +274,35 @@ quiet_cmd_gzip = GZIP $@
|
|||||||
|
|
||||||
# DTC
|
# DTC
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
ifeq ("$(origin DTC)", "command line")
|
||||||
|
PHONY += $(DTC)
|
||||||
|
dtc-option = $(call try-run, $(DTC) $1 -v,$1)
|
||||||
|
else
|
||||||
|
# Just add the flag. DTC is compiled later as a prerequisite, so there's no dtc
|
||||||
|
# to test the flag against. This is okay because we're not testing flags which
|
||||||
|
# aren't supported by in-kernel dtc to begin with.
|
||||||
|
dtc-option = $1
|
||||||
|
endif
|
||||||
|
|
||||||
DTC ?= $(objtree)/scripts/dtc/dtc
|
DTC ?= $(objtree)/scripts/dtc/dtc
|
||||||
DTC_FLAGS += -Wno-interrupt_provider
|
DTC_FLAGS += $(call dtc-option,-Wno-interrupt_provider)
|
||||||
|
|
||||||
# Disable noisy checks by default
|
# Disable noisy checks by default
|
||||||
ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),)
|
ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),)
|
||||||
DTC_FLAGS += -Wno-unit_address_vs_reg \
|
DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg) \
|
||||||
-Wno-unit_address_format \
|
$(call dtc-option,-Wno-unit_address_format) \
|
||||||
-Wno-avoid_unnecessary_addr_size \
|
$(call dtc-option,-Wno-avoid_unnecessary_addr_size) \
|
||||||
-Wno-alias_paths \
|
$(call dtc-option,-Wno-alias_paths) \
|
||||||
-Wno-graph_child_address \
|
$(call dtc-option,-Wno-graph_child_address) \
|
||||||
-Wno-simple_bus_reg \
|
$(call dtc-option,-Wno-simple_bus_reg) \
|
||||||
-Wno-unique_unit_address \
|
$(call dtc-option,-Wno-unique_unit_address) \
|
||||||
-Wno-pci_device_reg
|
$(call dtc-option,-Wno-pci_device_reg)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),)
|
ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),)
|
||||||
DTC_FLAGS += -Wnode_name_chars_strict \
|
DTC_FLAGS += $(call dtc-option,-Wnode_name_chars_strict) \
|
||||||
-Wproperty_name_chars_strict \
|
$(call dtc-option,-Wproperty_name_chars_strict) \
|
||||||
-Winterrupt_provider
|
$(call dtc-option,-Winterrupt_provider)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DTC_FLAGS += $(DTC_FLAGS_$(basetarget))
|
DTC_FLAGS += $(DTC_FLAGS_$(basetarget))
|
||||||
|
|||||||
Reference in New Issue
Block a user