MdePkg: Arm/AArch64 - filter #pragma pack() when __ASSEMBLER__

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>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Leif Lindholm 2017-12-06 16:57:55 +00:00
parent d1632f694b
commit 5b8766bb92
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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