BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1603
CLANG9 tool chain defines __clang__ macro only,
doesn't define __GNUC__ macro. But, it uses some same definitions with GCC.
So, update base definition for CLANG9 tool chain.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
#define VA_END(Marker) (Marker = (VA_LIST) 0)\r
#define VA_COPY(Dest, Start) ((void)((Dest) = (Start)))\r
\r
#define VA_END(Marker) (Marker = (VA_LIST) 0)\r
#define VA_COPY(Dest, Start) ((void)((Dest) = (Start)))\r
\r
-#elif defined(__GNUC__)\r
+#elif defined(__GNUC__) || defined(__clang__)\r
-#if defined(MDE_CPU_X64) && !defined(NO_MSABI_VA_FUNCS)\r
+#if defined(MDE_CPU_X64) && !defined(NO_MSABI_VA_FUNCS) && !defined(__clang__)\r
//\r
// X64 only. Use MS ABI version of GCC built-in macros for variable argument lists.\r
//\r
//\r
// X64 only. Use MS ABI version of GCC built-in macros for variable argument lists.\r
//\r
\r
**/\r
#define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0)\r
\r
**/\r
#define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0)\r
-#elif defined(__GNUC__)\r
+#elif defined (__GNUC__) || defined (__clang__)\r
void * __builtin_return_address (unsigned int level);\r
/**\r
Get the return address of the calling function.\r
void * __builtin_return_address (unsigned int level);\r
/**\r
Get the return address of the calling function.\r
/// Microsoft* compiler specific method for EFIAPI calling convention.\r
///\r
#define EFIAPI __cdecl\r
/// Microsoft* compiler specific method for EFIAPI calling convention.\r
///\r
#define EFIAPI __cdecl\r
-#elif defined(__GNUC__)\r
+#elif defined(__GNUC__) || defined(__clang__)\r
///\r
/// GCC specific method for EFIAPI calling convention.\r
///\r
///\r
/// GCC specific method for EFIAPI calling convention.\r
///\r
#define EFIAPI\r
#endif\r
\r
#define EFIAPI\r
#endif\r
\r
+#if defined(__GNUC__) || defined(__clang__)\r
///\r
/// For GNU assembly code, .global or .globl can declare global symbols.\r
/// Define this macro to unify the usage.\r
///\r
/// For GNU assembly code, .global or .globl can declare global symbols.\r
/// Define this macro to unify the usage.\r
#define EFIAPI\r
#endif\r
\r
#define EFIAPI\r
#endif\r
\r
+#if defined(__GNUC__) || defined(__clang__)\r
///\r
/// For GNU assembly code, .global or .globl can declare global symbols.\r
/// Define this macro to unify the usage.\r
///\r
/// For GNU assembly code, .global or .globl can declare global symbols.\r
/// Define this macro to unify the usage.\r