CryptoPkg: Fix possible build problem with Clang
authorXiaoyuX Lu <xiaoyux.lu@intel.com>
Wed, 29 May 2019 18:40:35 +0000 (18:40 +0000)
committerJian J Wang <jian.j.wang@intel.com>
Mon, 3 Jun 2019 00:28:02 +0000 (08:28 +0800)
commitc51f8bae7cabe749ce5fad91b34f3e74256ae4db
tree3fe5458ea27132f8ae416bfca1af8029844a8227
parent9c3c5c91ce6d1e7fc709a80310f6cd83ceca659a
CryptoPkg: Fix possible build problem with Clang

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1089

When building CryptoPkg with Clang, blow error may result

* /usr/lib/llvm-3.8/lib/clang/3.8.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: Ting Ye <ting.ye@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
CryptoPkg/Library/OpensslLib/OpensslLib.inf
CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf