]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Arm/AArch64 - filter #pragma pack() when __ASSEMBLER__
authorLeif Lindholm <leif.lindholm@linaro.org>
Wed, 6 Dec 2017 16:57:55 +0000 (16:57 +0000)
committerLeif Lindholm <leif.lindholm@linaro.org>
Thu, 7 Dec 2017 11:31:50 +0000 (11:31 +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 <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Include/AArch64/ProcessorBind.h
MdePkg/Include/Arm/ProcessorBind.h

index 775e7498c5c9d855a9680f7fc88be248622feaa4..7b0f0ff32f3baa47ba6369190ea77d14a8d1631a 100644 (file)
@@ -26,7 +26,7 @@
 //\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
index dde1fd1152bab6dba64cb3fea1023903441a177c..42ea2f3055f3df30b2d325acbfec4749ac6da86f 100644 (file)
@@ -24,7 +24,7 @@
 //\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