devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [TRIVIAL PATCH] of: per-file dtc preprocessor flags
@ 2019-07-19 19:28 Eugeniy Paltsev
  2019-07-20  2:40 ` Masahiro Yamada
  0 siblings, 1 reply; 4+ messages in thread
From: Eugeniy Paltsev @ 2019-07-19 19:28 UTC (permalink / raw)
  To: linux-kbuild, Masahiro Yamada, Michal Marek
  Cc: linux-kernel, devicetree, linux-snps-arc, Vineet Gupta,
	Alexey Brodkin, Eugeniy Paltsev

As of today we are able to pass custom flags to dtc compiler but not
to dtc preprocessor.
This ability is required for including some board-specific header files.
It allows us to pass defined constants to dts without their duplication
in several places.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
---
 scripts/Makefile.lib | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index f1f38c8cdc74..f2595a608dce 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -166,6 +166,8 @@ dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc                    \
 		 $(addprefix -I,$(DTC_INCLUDE))                          \
 		 -undef -D__DTS__
 
+dtc_cpp_flags  += $(DTC_CPP_FLAGS_$(basetarget))
+
 # Useful for describing the dependency of composite objects
 # Usage:
 #   $(call multi_depend, multi_used_targets, suffix_to_remove, suffix_to_add)
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-22  1:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-19 19:28 [TRIVIAL PATCH] of: per-file dtc preprocessor flags Eugeniy Paltsev
2019-07-20  2:40 ` Masahiro Yamada
2019-07-20 15:37   ` Eugeniy Paltsev
2019-07-22  1:43     ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).