From patchwork Fri Jul 13 13:03:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Horst Kronstorfer X-Patchwork-Id: 170899 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 60B0B2C0361 for ; Fri, 13 Jul 2012 23:38:34 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8179828148; Fri, 13 Jul 2012 15:38:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CsRqBmiqRj3H; Fri, 13 Jul 2012 15:38:30 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B5D4D28138; Fri, 13 Jul 2012 15:38:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 09CE028138 for ; Fri, 13 Jul 2012 15:38:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LveeLjkeEV0P for ; Fri, 13 Jul 2012 15:38:19 +0200 (CEST) X-Greylist: delayed 2064 seconds by postgrey-1.27 at theia; Fri, 13 Jul 2012 15:38:17 CEST X-policyd-weight: IN_SBL_XBL_SPAMHAUS=4.35 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from m3f4.kronos.net (178-190-203-50.adsl.highway.telekom.at [178.190.203.50]) by theia.denx.de (Postfix) with ESMTPS id 309E328132 for ; Fri, 13 Jul 2012 15:38:17 +0200 (CEST) Received: from m3f4.kronos.net (m3f4.kronos.net [127.0.0.1]) by m3f4.kronos.net (8.14.5/8.14.5) with ESMTP id q6DD3hAP031523; Fri, 13 Jul 2012 15:03:43 +0200 Received: (from mabuze@localhost) by m3f4.kronos.net (8.14.5/8.14.5/Submit) id q6DD3htF031522; Fri, 13 Jul 2012 15:03:43 +0200 From: Horst Kronstorfer To: u-boot@lists.denx.de Date: Fri, 13 Jul 2012 15:03:40 +0200 Message-Id: <1342184620-31448-1-git-send-email-hkronsto@frequentis.com> X-Mailer: git-send-email 1.7.11.2 Subject: [U-Boot] [PATCH] dts/Makefile: Turn off system-/gcc-specific predefined macros X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Add '-undef' to DTS_CPPFLAGS to avoid unwanted expansion of dts content that matches system-specific or gcc-specific predefined macros. Example: A number of PowerPC related *.dts files in the kernel define a property named 'linux,network-index' which (w/o '-undef') is expanded to '1,network-index' by the preprocessor because of '#define linux 1.' With '-undef' in place only the standard predefined macros are visible: $ gcc -dM -E -undef - --- dts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 := -undef -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\" all: $(obj).depend $(LIB)