diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 54871e7..0314ea2 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -223,6 +223,7 @@ DTC_INCLUDE += $(srctree)/scripts/dtc/include-prefixes dtc_cpp_flags = -Wp,-MMD,$(depfile).pre.tmp -nostdinc \ $(addprefix -I,$(DTC_INCLUDE)) \ + $(DTC_CPP_FLAGS) \ -undef -D__DTS__ ifeq ($(CONFIG_LTO_CLANG),y) @@ -348,7 +349,8 @@ $(obj)/%.dtb.S: $(obj)/%.dtb FORCE $(call if_changed,dt_S_dtb) quiet_cmd_dtc = DTC $@ -cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ +cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ + $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ $(DTC) -o $@ -b 0 \ $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \ -d $(depfile).dtc.tmp $(dtc-tmp) ; \