diff mbox

[edk2] MdePkg/ProcessorBind.h: Add ARM and AArch64 GCC macros for Clang

Message ID 1414679344-4154-1-git-send-email-olivier.martin@arm.com
State New
Headers show

Commit Message

Olivier Martin Oct. 30, 2014, 2:29 p.m. UTC
When compiling with Clang, we still use GNU as for the assembler,
so we still need to define the GCC_ASM* macros.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
---
 MdePkg/Include/AArch64/ProcessorBind.h | 4 +++-
 MdePkg/Include/Arm/ProcessorBind.h     | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h
index f09b15a..c5fe874 100644
--- a/MdePkg/Include/AArch64/ProcessorBind.h
+++ b/MdePkg/Include/AArch64/ProcessorBind.h
@@ -111,7 +111,9 @@  typedef INT64   INTN;
 //
 #define EFIAPI
 
-#if defined(__GNUC__)
+// When compiling with Clang, we still use GNU as for the assembler, so we still
+// need to define the GCC_ASM* macros.
+#if defined(__GNUC__) || defined(__clang__)
   ///
   /// For GNU assembly code, .global or .globl can declare global symbols.
   /// Define this macro to unify the usage.
diff --git a/MdePkg/Include/Arm/ProcessorBind.h b/MdePkg/Include/Arm/ProcessorBind.h
index cc763b3..c2482c2 100644
--- a/MdePkg/Include/Arm/ProcessorBind.h
+++ b/MdePkg/Include/Arm/ProcessorBind.h
@@ -110,7 +110,9 @@  typedef INT32   INTN;
 //
 #define EFIAPI    
 
-#if defined(__GNUC__)
+// When compiling with Clang, we still use GNU as for the assembler, so we still
+// need to define the GCC_ASM* macros.
+#if defined(__GNUC__) || defined(__clang__)
   ///
   /// For GNU assembly code, .global or .globl can declare global symbols.
   /// Define this macro to unify the usage.