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>
//\r
// Make sure we are using the correct packing rules per EFI specification\r
//\r
-#ifndef __GNUC__\r
+#if !defined(__GNUC__) && !defined(__ASSEMBLER__)\r
#pragma pack()\r
#endif\r
\r
//\r
// Make sure we are using the correct packing rules per EFI specification\r
//\r
-#ifndef __GNUC__\r
+#if !defined(__GNUC__) && !defined(__ASSEMBLER__)\r
#pragma pack()\r
#endif\r
\r