From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Google-Smtp-Source: AGs4zMaj9xfloCmt9hMcMw+cJ7VrF3BKKtpx4NChY+4jC3cuSOWD4ACvKY6D/+PkC0QIl8wVWtizVQ== 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 Cc: Michael D Kinney , Liming Gao , ard.biesheuvel@linaro.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: [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: , X-List-Received-Date: Wed, 06 Dec 2017 17:03:19 -0000 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(-) 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 -- 2.11.0