CryptoPkg: Fix build problem with XCODE

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>
This commit is contained in:
Xiaoyu Lu
2019-06-03 17:52:38 +08:00
committed by Liming Gao
parent 49edde1523
commit 466c66341a
6 changed files with 11 additions and 5 deletions

View File

@@ -99,3 +99,5 @@
GCC:*_CLANG35_*_CC_FLAGS = -std=c99
GCC:*_CLANG38_*_CC_FLAGS = -std=c99
XCODE:*_*_*_CC_FLAGS = -std=c99

View File

@@ -96,3 +96,5 @@
GCC:*_CLANG35_*_CC_FLAGS = -std=c99
GCC:*_CLANG38_*_CC_FLAGS = -std=c99
XCODE:*_*_*_CC_FLAGS = -std=c99

View File

@@ -104,3 +104,5 @@
GCC:*_CLANG35_*_CC_FLAGS = -std=c99
GCC:*_CLANG38_*_CC_FLAGS = -std=c99
XCODE:*_*_*_CC_FLAGS = -std=c99

View File

@@ -97,7 +97,7 @@
#
MSFT:*_*_*_CC_FLAGS = /wd4090
XCODE:*_*_*_CC_FLAGS = -mmmx -msse
XCODE:*_*_*_CC_FLAGS = -mmmx -msse -std=c99
GCC:*_CLANG35_*_CC_FLAGS = -std=c99
GCC:*_CLANG38_*_CC_FLAGS = -std=c99