diff mbox

[U-Boot,v2] dts/Makefile: Turn off some predefined macros

Message ID 1343337995-1291-1-git-send-email-hkronsto@frequentis.com
State Accepted
Headers show

Commit Message

Horst Kronstorfer July 26, 2012, 9:26 p.m. UTC
Add '-ansi' to DTS_CPPFLAGS to avoid unwanted expansion of dts content
that matches some predefined macros.

Example: A number of PowerPC related *.dts files in the kernel define a
property named 'linux,network-index' which (w/o '-ansi') is expanded to
'1,network-index' by the preprocessor because of '#define linux 1.'

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
---
Changes in v2:
	- Use '-ansi' instead of '-undef.'

 dts/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Wolfgang Denk Aug. 10, 2012, 9:53 p.m. UTC | #1
Dear Horst Kronstorfer,

In message <1343337995-1291-1-git-send-email-hkronsto@frequentis.com> you wrote:
> Add '-ansi' to DTS_CPPFLAGS to avoid unwanted expansion of dts content
> that matches some predefined macros.
> 
> Example: A number of PowerPC related *.dts files in the kernel define a
> property named 'linux,network-index' which (w/o '-ansi') is expanded to
> '1,network-index' by the preprocessor because of '#define linux 1.'
> 
> Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
> ---
> Changes in v2:
> 	- Use '-ansi' instead of '-undef.'
> 
>  dts/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied this one instead, thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/dts/Makefile b/dts/Makefile
index 402dfe1..3c6bc18 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -36,7 +36,7 @@  $(error Your architecture does not have device tree support enabled. \
 Please define CONFIG_ARCH_DEVICE_TREE))
 
 # We preprocess the device tree file provide a useful define
-DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\"
+DTS_CPPFLAGS := -ansi -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\"
 
 all:	$(obj).depend $(LIB)