[edk2,v3,2/9] CryptoPkg: set new define to avoid MS ABI VA_LIST on GCC/X64

Message ID 1468751686-28047-3-git-send-email-ard.biesheuvel@linaro.org
State Accepted
Commit b2dc04a87fab89307240dc0f30b9a23bb5726c81
Headers show

Commit Message

Ard Biesheuvel July 17, 2016, 10:34 a.m.
Set the #define NO_MSABI_VA_FUNCS that will be introduced in a subsequent
patch to avoid the use of the MS ABI in variadic functions. In EDK2, such
functions normally require the EFIAPI modifier to be used, but for external
libraries such as OpenSSL, which lack these annotations, it is easier to
simply revert to the default SysV style VA_LIST ABI.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 CryptoPkg/Library/OpensslLib/OpensslLib.inf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Patch

diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
index 4488bb522268..f3c7850b517f 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
@@ -509,7 +509,7 @@  [BuildOptions]
   INTEL:*_*_IPF_CC_FLAGS    = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w
 
   GCC:*_*_IA32_CC_FLAGS     = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -w
-  GCC:*_*_X64_CC_FLAGS      = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -w -UNO_BUILTIN_VA_FUNCS
+  GCC:*_*_X64_CC_FLAGS      = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -w -UNO_BUILTIN_VA_FUNCS -DNO_MSABI_VA_FUNCS
   GCC:*_*_IPF_CC_FLAGS      = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -w
   GCC:*_*_ARM_CC_FLAGS      = $(OPENSSL_FLAGS) -w
   GCC:*_*_AARCH64_CC_FLAGS  = $(OPENSSL_FLAGS) -w