]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EdkCompatibilityPkg: Fix GCC build failure
authorLiming Gao <liming.gao@intel.com>
Thu, 28 Jul 2016 07:35:27 +0000 (15:35 +0800)
committerLiming Gao <liming.gao@intel.com>
Mon, 1 Aug 2016 04:44:44 +0000 (12:44 +0800)
Edk2 enables Os option and ms_va_list in GCC tool chain.
This change makes VA_LIST is not pointer, and cause GCC failure.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/SmmRuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/ReportStatusCode.c

index a1c232dea04300500202b86532e70e408a314db2..fdd4619ca7ed467305bd62a65b92a28289e9feea 100644 (file)
@@ -296,7 +296,7 @@ GlueReportStatusCodeExtractDebugInfo (
 \r
   *ErrorLevel = DebugInfo->ErrorLevel;\r
 \r
-#ifdef __APPLE__\r
+#if defined(__APPLE__) || defined(__GNUC__)\r
   // This is non portable C code you can't assume VA_LIST is pointer\r
   return FALSE;\r
 #else\r
index 29207e0f5b1e2a4f5916cdca9504edcedb3c7932..16d6473c69253de429e590fddfd13985b32fe038 100644 (file)
@@ -248,7 +248,7 @@ GlueReportStatusCodeExtractDebugInfo (
   // The first 12 * UINTN bytes of the string are really an \r
   // argument stack to support varargs on the Format string.\r
   //\r
-#ifdef __APPLE__\r
+#if defined(__APPLE__) || defined(__GNUC__)\r
   // This is non portable C code you can't assume VA_LIST is pointer\r
   return FALSE;\r
 #else\r
index ef16d4010d8d1260844d54e3f693906d8f58ca51..c9835a432a072374aeb21d4bb4f9d61f23264008 100644 (file)
@@ -280,7 +280,7 @@ GlueReportStatusCodeExtractDebugInfo (
   // The first 12 * UINTN bytes of the string are really an\r
   // argument stack to support varargs on the Format string.\r
   //\r
-#ifdef __APPLE__\r
+#if defined(__APPLE__) || defined(__GNUC__)\r
   // This is non portable C code you can't assume VA_LIST is pointer\r
   return FALSE;\r
 #else\r
index 58d97ac7e19cf113b9a092cfacc9f3760106cc75..b23b345ebc76f62a770b9a3e8176ad6f7a491bc2 100644 (file)
@@ -332,7 +332,7 @@ Returns:
   // The first 12 * UINTN bytes of the string are really an \r
   // arguement stack to support varargs on the Format string.\r
   //\r
-#if (defined (EFIARM) || defined (EFIAARCH64) || defined (__APPLE__))\r
+#if (defined (EFIARM) || defined (EFIAARCH64) || defined (__APPLE__) || defined (__GNUC__))\r
   // It is not legal C code to cast VA_LIST to a pointer. VA_LIST can \r
   // be a structure. \r
   return FALSE;\r