From patchwork Thu Oct 26 10:12:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 117187 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp575483qgn; Thu, 26 Oct 2017 03:12:22 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TEO3A2lx4m7JeRB0wuSWoadDFg0or07Uv6yuFtVoEQlwcVgA8q+ssilhwn53TF51uktpto X-Received: by 10.159.194.196 with SMTP id u4mr4029288plz.49.1509012742556; Thu, 26 Oct 2017 03:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509012742; cv=none; d=google.com; s=arc-20160816; b=aCvvMNVDFI5Ti3nUX4gzt6RGFLo7uNTN6HiTvkDpPmPqiMq5wPsn6eVWKDXLzafoiJ mXojzYDn0boR1fgHemY6FH6igdxO1PL9+SZIL+SYLPhdAL9Xr+h4K3i3DRgp4rZ3Wj/h dyiaaQzEuCvlSCD6Ct/hoZ2HQycewPLu5sNLmdMka90IZqGCnpz6sD3Q9X53AKmePoyp 4w64KVGf326xkDCeJ7Znj6zktrI8VZySflFjgJHxSjNFHi3Afu8HvCj54uT6cZOFUt0F Nhlf9pbnXfiZu1bcAXtZ1gzm5zlvq5aCl0d2u9dX7/C6NiMhshLlVdv1TATsj6q2ylPl DrFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=aF31aaVBiOIjeSlF0A6agOdL5Oc32YGnVM1iQH0P31A=; b=VaRXmP0qzBa/vWOE0QIwaarwbmGyYVJf0C4To7YujHKd5mIor0osOKiUzE+yNgS4mv dJaq0QV0g9Gu6PuMKMP/BCIWzoi+eQjjJnivUo1f1kDC4ugTuB1WoVd5EOt/qhNOiysS 5WAnJszlu1nW/ZK0ztoDuOG/HiX6VD5NbqBxj4xIxePuzWMplFnQTHkC5N1lVJFPTfDd 6nv5QXz792f28wGTxMNF0eUgYpG7xwEKfVacuZalSWdd6rXUKt5zHc+swxq0IUaJ/prj afM4OALTXnyuYsC9c55AAe82wN9bosmElLqM2Q4qDZlQSA4/gK9OXbsuFh3OQM1ZZXoQ J8Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=T2HWIaML; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id f10si2740873pln.509.2017.10.26.03.12.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Oct 2017 03:12:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=T2HWIaML; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DD4042034A7B3; Thu, 26 Oct 2017 03:08:35 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::242; helo=mail-wm0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7069721CEB138 for ; Thu, 26 Oct 2017 03:08:34 -0700 (PDT) Received: by mail-wm0-x242.google.com with SMTP id b9so7183189wmh.0 for ; Thu, 26 Oct 2017 03:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=C5l5LQKftqY2/vPdpk+jElnXKp9uuFnsvQqY3C1r868=; b=T2HWIaMLhnNVEZfU80bJgReRqJv9BzBpZnFymSLj8hrTqL16pLjXS8i5ANGHRx5/ux +Y77/S2PMCwqapMyZYvrCzW1a7kx+TT+zT4FkYYBr6z8FzPxAsEavkIu/wUnwN3JzCPg Cv66YT6XVUyeZzAjrI6KRn5NqzH4i14dLcv40= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=C5l5LQKftqY2/vPdpk+jElnXKp9uuFnsvQqY3C1r868=; b=mClmQf6xRCc1pM3LYJow/h5x+lQBwLQXPFHDNT1RXCzPtKp19dD3R17IAYZVdczHp5 o/koMgXGHlZ1wbFaCiheds9vd3MW2cadAZgvVzQzW5rBNRrRhs0BmtsQXUdcQWON87C6 ctZma+RfCCBJ+QFThWReJ2Px3DndPDilcqUvVA0WCWtKfeNY3ZbnjbWmZb5cD8WDnPoj cDreQNJonvA4TIkB/piG1xMeEjbOkEGgOyvHmy/bJnBj7Ho2769KKqDh9Xt9411G9tsm FHKhCqE67dUD32xKKLRhr9kQg/EQxRoWwOqDYLphEBpFOrp8akAv8uKd9fdD48SCt49I poMQ== X-Gm-Message-State: AMCzsaVcWwQGyHp3lBqKtKnO6+lDyDoMuaUeiPA4aNkH4daNJVejoGmR lbWmtaq9LXoAkcfgI6x6Ke+FP2izfzo= X-Received: by 10.28.133.12 with SMTP id h12mr1221378wmd.148.1509012738738; Thu, 26 Oct 2017 03:12:18 -0700 (PDT) Received: from localhost.localdomain ([160.171.245.11]) by smtp.gmail.com with ESMTPSA id u57sm5171231wrf.43.2017.10.26.03.12.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Oct 2017 03:12:17 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 26 Oct 2017 11:12:09 +0100 Message-Id: <20171026101209.31630-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH] BaseTools/tools_def: suppress GCC predefined macros in DTB compilation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel , liming.gao@intel.com, leif.lindholm@linaro.org MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" The standard GCC preprocessor we use to preprocess device tree sources files has a whole bunch of macros predefined, among which This causes a property like 'linux,code' to be converted into '1,code' which is obviously wrong. So let's get rid of all the predefined macros by passing -undef to the preprocessor command line. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- BaseTools/Conf/tools_def.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Acked-by: Laszlo Ersek Reviewed-by: Leif Lindholm Reviewed-by: Liming Gao diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index df7c109438fd..98df0ffc9294 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -4369,7 +4369,7 @@ DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(DEST_DI DEFINE GCC_ASLPP_FLAGS = -x c -E -include AutoGen.h DEFINE GCC_ASLCC_FLAGS = -x c DEFINE GCC_WINDRES_FLAGS = -J rc -O coff -DEFINE GCC_DTCPP_FLAGS = -E -x assembler-with-cpp -imacros $(DEST_DIR_DEBUG)/AutoGen.h -nostdinc +DEFINE GCC_DTCPP_FLAGS = -E -x assembler-with-cpp -imacros $(DEST_DIR_DEBUG)/AutoGen.h -nostdinc -undef DEFINE GCC_IA32_RC_FLAGS = -I binary -O elf32-i386 -B i386 --rename-section .data=.hii DEFINE GCC_X64_RC_FLAGS = -I binary -O elf64-x86-64 -B i386 --rename-section .data=.hii DEFINE GCC_IPF_RC_FLAGS = -I binary -O elf64-ia64-little -B ia64 --rename-section .data=.hii