REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1089
When building CryptoPkg with XCODE, blow error may result
* usr/lib/clang/9.0.0/include/stdatomic.h:105:17:
error: unknown type name 'wchar_t'
Since the C native atomics are C11 feature we can explicitly
use C99 to work around it.
add -std=c99 to avoid it
* openssl/crypto/conf/conf_sap.c:71:12: error: variable 'ret' is
uninitialized
when used here [-Werror,-Wuninitialized]
Suppress warnings in OpenSSL so we don't break the build with -Werror.
add -Wno-error=uninitialized to disalbe this warning
Cc: Jian Wang <jian.j.wang@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
\r
GCC:*_CLANG35_*_CC_FLAGS = -std=c99\r
GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
\r
GCC:*_CLANG35_*_CC_FLAGS = -std=c99\r
GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
+\r
+ XCODE:*_*_*_CC_FLAGS = -std=c99\r
\r
GCC:*_CLANG35_*_CC_FLAGS = -std=c99\r
GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
\r
GCC:*_CLANG35_*_CC_FLAGS = -std=c99\r
GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
+\r
+ XCODE:*_*_*_CC_FLAGS = -std=c99\r
\r
GCC:*_CLANG35_*_CC_FLAGS = -std=c99\r
GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
\r
GCC:*_CLANG35_*_CC_FLAGS = -std=c99\r
GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
+\r
+ XCODE:*_*_*_CC_FLAGS = -std=c99\r
#\r
MSFT:*_*_*_CC_FLAGS = /wd4090\r
\r
#\r
MSFT:*_*_*_CC_FLAGS = /wd4090\r
\r
- XCODE:*_*_*_CC_FLAGS = -mmmx -msse\r
+ XCODE:*_*_*_CC_FLAGS = -mmmx -msse -std=c99\r
\r
GCC:*_CLANG35_*_CC_FLAGS = -std=c99\r
GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
\r
GCC:*_CLANG35_*_CC_FLAGS = -std=c99\r
GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
# 3017: <entity> may be used before being set (NOTE: This was fixed in OpenSSL 1.1 HEAD with\r
# commit d9b8b89bec4480de3a10bdaf9425db371c19145b, and can be dropped then.)\r
RVCT:*_*_ARM_CC_FLAGS = $(OPENSSL_FLAGS) --library_interface=aeabi_clib99 --diag_suppress=1296,1295,550,1293,111,68,177,223,144,513,188,128,546,1,3017 -JCryptoPkg/Include\r
# 3017: <entity> may be used before being set (NOTE: This was fixed in OpenSSL 1.1 HEAD with\r
# commit d9b8b89bec4480de3a10bdaf9425db371c19145b, and can be dropped then.)\r
RVCT:*_*_ARM_CC_FLAGS = $(OPENSSL_FLAGS) --library_interface=aeabi_clib99 --diag_suppress=1296,1295,550,1293,111,68,177,223,144,513,188,128,546,1,3017 -JCryptoPkg/Include\r
- XCODE:*_*_IA32_CC_FLAGS = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -w\r
- XCODE:*_*_X64_CC_FLAGS = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -w\r
+ XCODE:*_*_IA32_CC_FLAGS = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -w -std=c99 -Wno-error=uninitialized\r
+ XCODE:*_*_X64_CC_FLAGS = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -w -std=c99 -Wno-error=uninitialized\r
\r
#\r
# AARCH64 uses strict alignment and avoids SIMD registers for code that may execute\r
\r
#\r
# AARCH64 uses strict alignment and avoids SIMD registers for code that may execute\r
# 3017: <entity> may be used before being set (NOTE: This was fixed in OpenSSL 1.1 HEAD with\r
# commit d9b8b89bec4480de3a10bdaf9425db371c19145b, and can be dropped then.)\r
RVCT:*_*_ARM_CC_FLAGS = $(OPENSSL_FLAGS) --library_interface=aeabi_clib99 --diag_suppress=1296,1295,550,1293,111,68,177,223,144,513,188,128,546,1,3017 -JCryptoPkg/Include\r
# 3017: <entity> may be used before being set (NOTE: This was fixed in OpenSSL 1.1 HEAD with\r
# commit d9b8b89bec4480de3a10bdaf9425db371c19145b, and can be dropped then.)\r
RVCT:*_*_ARM_CC_FLAGS = $(OPENSSL_FLAGS) --library_interface=aeabi_clib99 --diag_suppress=1296,1295,550,1293,111,68,177,223,144,513,188,128,546,1,3017 -JCryptoPkg/Include\r
- XCODE:*_*_IA32_CC_FLAGS = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -w\r
- XCODE:*_*_X64_CC_FLAGS = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -w\r
+ XCODE:*_*_IA32_CC_FLAGS = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -w -std=c99 -Wno-error=uninitialized\r
+ XCODE:*_*_X64_CC_FLAGS = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -w -std=c99 -Wno-error=uninitialized\r
\r
#\r
# AARCH64 uses strict alignment and avoids SIMD registers for code that may execute\r
\r
#\r
# AARCH64 uses strict alignment and avoids SIMD registers for code that may execute\r