[openwrt/openwrt] build: add support for passing C preprocessor flags for DTS builds

LEDE Commits lede-commits at lists.infradead.org
Sun Mar 27 12:38:04 PDT 2022


nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/ac11f36b337da29f422d16776cf36c98013dcc77

commit ac11f36b337da29f422d16776cf36c98013dcc77
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Mar 27 21:23:49 2022 +0200

    build: add support for passing C preprocessor flags for DTS builds
    
    Useful for adding #ifdefs based on build system provided definitions, or
    for adding extra include paths
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 include/image.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/image.mk b/include/image.mk
index 275a0adcac..e5b52d0e97 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -184,6 +184,7 @@ endef
 # $(4) extra DTC flags
 define Image/BuildDTB
 	$(TARGET_CROSS)cpp -nostdinc -x assembler-with-cpp \
+		$(DTS_CPPFLAGS) \
 		-I$(DTS_DIR) \
 		-I$(DTS_DIR)/include \
 		-I$(LINUX_DIR)/include/ \




More information about the lede-commits mailing list