From patchwork Wed Dec 6 17:07:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 120879 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp7304590qgn; Wed, 6 Dec 2017 09:07:54 -0800 (PST) X-Google-Smtp-Source: AGs4zMbbFtXkrLZ9cosAEMH52KLebrIlbyr7q+cJk2GTbHLTg49ZP+bLZ+DbWASOv4zedXqlH9ys X-Received: by 10.99.184.25 with SMTP id p25mr21507219pge.337.1512580074036; Wed, 06 Dec 2017 09:07:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512580074; cv=none; d=google.com; s=arc-20160816; b=Oo3txk1MTieGPb14K7Zaf1GrRAFoSQvuMaV8iHaL03f+WxogneHKzoLtJhwoyNRzld PCzalLZ+O1qDw1TQ+qW+Gli/AznqhHdnhdt3/rWvJYMjOSRrUovDpcR2Zpk853APTsHc JaKv3P9M35Gf/NV8NoompeJoCsH4F5cwXoRdTq1CKDC8M5UuJXg0qfXmNLvfd2kHgwlY BWnNPQVdUhvLys7X6pvXESPhrq/q6E46xdSty0KgWrQ/0K95R5O/cWgaP3H/rYO0b72W bVoqnVqartz5k0ieUCVsWDGVqfCiKE/r6ozWXCp9nmTKJiuvfJAIGgRcqPPZt1ArqdVF hONA== 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=/V7eEU6x83otordG+KcYS6piAy3nBcJFrcRu2zZVIIk=; b=Xpvt5E4dQ8ilbGAZvh4xX13reC2mfaldqgX/9I/usPvLJm3GJo4pM1Idh31aD14Bro TppIzZXE1kKd2bgRAyxG4owCWux4NXUAfvOPBcg9MYSOM4Z81ZQTh/EzmTcLKi2jglKQ RFlRhsU+g/GgFMPaRt0hcV/5dlDCRJG6Siy85nBJhbeOrMbxfDsSjigySvihG6oaZz3A 7OBtx3+hHNx5b80UBJp1dZziKx1XVjb3/J2Ls2WH1t9hTa8idU7NicKUgbaki/ZdUgrZ KnTeIbeUvvtZFGniFOEsZMaHkJdfymfyJdw9cZVDNHg0E9dp4Q/SGe84xicvOQq34rrE aW8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LWGAs91Q; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id p15si2428745pfk.14.2017.12.06.09.07.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Dec 2017 09:07:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LWGAs91Q; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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 B9D5A2217CE5A; Wed, 6 Dec 2017 09:03:20 -0800 (PST) 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::244; helo=mail-wm0-x244.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (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 A3FAD2217CE57 for ; Wed, 6 Dec 2017 09:03:18 -0800 (PST) Received: by mail-wm0-x244.google.com with SMTP id g130so23992653wme.0 for ; Wed, 06 Dec 2017 09:07:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=RkRUs1m64PNAS2ziQJjqm2mZ6LEKxbg8lB25jaq+Ezk=; b=LWGAs91QA99kxHE6j0EDAfhiRzFEINAnslVXDmbLyCVhX/bFC1SPnFtv/tYTNalCky RowcaUF3eEHHbR6LtmczpSD3IeI8ErP5CbQ8rTkBTk9gn0H8klAg/8XBtCsC5h/NET3x uWWuaF2mhEtDqdXDGdvchNx5xsRWIbh7T4hbc= 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=RkRUs1m64PNAS2ziQJjqm2mZ6LEKxbg8lB25jaq+Ezk=; b=NqSy5tiXjJj9PgzgP838nghZTxJ7Gh3kMnTyH2gDy4cvznbEX4aAjDQZWn9Sje89nK 4YMD+HA0BmHlerIkyywVFC02GQ0mSu3onnyEpvDYU5LzNeswISEeCwpXsM7gbW+ltSHc rRr3nfGd7XW3p+mRWFKIp8NXcE6scFlRKBYOcJNO1Mw7pUYLhM1XAQPF+MSFLwoNjdfy 7EAY59Cc4DT1pmk01xPK9Lh+DuTNfUCuuK7Eg/kJLQKpFqQ4G3EDG9pDOIY6HwmuiWlw yPgpl9Tb5139TIvlrp1enqaylZaskkZKmi8QeezkE3hxuG60xeSU+Y3t7+rbFnjAmjK3 ZZvA== X-Gm-Message-State: AKGB3mKB/UMu510XKVJtWdMyvNuD7irW3cN6a/gk429H26LRNB/RlxV8 iMtkZt+Gw9MIDBuQhi3yd9vuVNbvrG8= X-Received: by 10.28.36.194 with SMTP id k185mr12320487wmk.26.1512580068547; Wed, 06 Dec 2017 09:07:48 -0800 (PST) Received: from vanye.hemma.eciton.net (cpc92316-cmbg19-2-0-cust118.5-4.cable.virginm.net. [82.12.0.119]) by smtp.gmail.com with ESMTPSA id 52sm4167425wrv.8.2017.12.06.09.07.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Dec 2017 09:07:47 -0800 (PST) From: Leif Lindholm To: edk2-devel@lists.01.org Date: Wed, 6 Dec 2017 17:07:45 +0000 Message-Id: <20171206170745.8705-1-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH] MdePkg: Arm/AArch64 - filter #pragma pack() when __ASSEMBLER__ 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: Michael D Kinney , Liming Gao , ard.biesheuvel@linaro.org MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" clang, when used as a preprocessor for dtc, does not discard #pragma statements although -x assembler-with-cpp is specified. This causes dtc to barf at a #pragma pack() statement that is already filtered out for __GNUC__. So add a check to also filter this out if __ASSEMBLER__. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm --- MdePkg/Include/AArch64/ProcessorBind.h | 2 +- MdePkg/Include/Arm/ProcessorBind.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Ard Biesheuvel Reviewed-by: Liming Gao diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h index 775e7498c5..7b0f0ff32f 100644 --- a/MdePkg/Include/AArch64/ProcessorBind.h +++ b/MdePkg/Include/AArch64/ProcessorBind.h @@ -26,7 +26,7 @@ // // Make sure we are using the correct packing rules per EFI specification // -#ifndef __GNUC__ +#if !defined(__GNUC__) && !defined(__ASSEMBLER__) #pragma pack() #endif diff --git a/MdePkg/Include/Arm/ProcessorBind.h b/MdePkg/Include/Arm/ProcessorBind.h index dde1fd1152..42ea2f3055 100644 --- a/MdePkg/Include/Arm/ProcessorBind.h +++ b/MdePkg/Include/Arm/ProcessorBind.h @@ -24,7 +24,7 @@ // // Make sure we are using the correct packing rules per EFI specification // -#ifndef __GNUC__ +#if !defined(__GNUC__) && !defined(__ASSEMBLER__) #pragma pack() #endif