From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Michael D Kinney <michael.d.kinney@intel.com>,
Liming Gao <liming.gao@intel.com>
Subject: Re: [PATCH] MdePkg: Arm/AArch64 - filter #pragma pack() when __ASSEMBLER__
Date: Wed, 6 Dec 2017 17:09:09 +0000 [thread overview]
Message-ID: <CAKv+Gu-uyr7FhV9veNrn2ha73RWxtao6MOyZk2RYf88HbDoQtw@mail.gmail.com> (raw)
In-Reply-To: <20171206170745.8705-1-leif.lindholm@linaro.org>
On 6 December 2017 at 17:07, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> 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 <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> 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
>
next prev parent reply other threads:[~2017-12-06 17:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 17:07 [PATCH] MdePkg: Arm/AArch64 - filter #pragma pack() when __ASSEMBLER__ Leif Lindholm
2017-12-06 17:09 ` Ard Biesheuvel [this message]
2017-12-07 3:09 ` Gao, Liming
2017-12-07 11:33 ` Leif Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKv+Gu-uyr7FhV9veNrn2ha73RWxtao6MOyZk2RYf88HbDoQtw@mail.gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox