From nobody Mon Feb 9 02:27:58 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+41593+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+41593+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1559126579; cv=none; d=zoho.com; s=zohoarc; b=jPCCF5wGIM41oc+A09whajiaOxI3PW0s0+bEteLI0aNLywxEoOjbbENQXX/sYgLqL6njYABqETDHJ6SXUbVdnXv4ivp5LVwAwC1OiF/I25zDXmaEb9f+9xHG94PXpiar8ERGoXeiaIlZjsqzgDboIOmJw/2I1VnOLTAbLcwbfS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559126579; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=HpyfOY3oUJTTy0Icotw3d+lAUqaXbgOMq+sjwBi+Gfw=; b=YeaYmJJB1hJzez74sVUVbPvdcJUjaYXSh7uBP0SbwH89CQyHSGsthnTtuL/zHnzVC6D+kw31B8n/f1ct03qkeLLov+vzRnhiyqR6RRJnySedI0wL4BrCDiX/3tVANrPgxRbL5pFjwRAFWguwVAxsq5EaNNXlQUoMb3C23EqAA78= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+41593+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1559126579726163.83724128712413; Wed, 29 May 2019 03:42:59 -0700 (PDT) Return-Path: X-Received: from mga14.intel.com (mga14.intel.com []) by groups.io with SMTP; Wed, 29 May 2019 03:42:59 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 May 2019 03:42:58 -0700 X-ExtLoop1: 1 X-Received: from xiaoyu-dev.sh.intel.com ([10.239.47.11]) by fmsmga004.fm.intel.com with ESMTP; 29 May 2019 03:42:58 -0700 From: "Xiaoyu Lu" To: devel@edk2.groups.io Cc: Xiaoyu Lu , Ting Ye , Jian J Wang Subject: [edk2-devel] [PATCH v5 6/9] CryptoPkg: Fix possible build problem with Clang Date: Wed, 29 May 2019 06:40:35 -0400 Message-Id: <1559126438-9211-7-git-send-email-xiaoyux.lu@intel.com> In-Reply-To: <1559126438-9211-1-git-send-email-xiaoyux.lu@intel.com> References: <1559126438-9211-1-git-send-email-xiaoyux.lu@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,xiaoyux.lu@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1559126579; bh=vPEDTArLgaSYD6w04TxrGqEAXleWBrwrs/Cm3at576o=; h=Cc:Date:From:Reply-To:Subject:To; b=LRwzzJPzvAf4kdc+E1WBzeEabNo5/BNPH5V11VVgMTssRfGY0aJ1uFCGBMS3K5W7YnE Sbosf0i3tIIYkRhtl8I90vDdbGTEAsf0Ql4Sdl9P0/XcQSM2P/L1Fyllv7jwuCZItzeIP ks4AkqIZiXU3S+XHFcQgmq9laq+LD5O3Uw4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1089 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=3Dc99 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=3Duninitialized to disalbe this warning Cc: Ting Ye Cc: Jian J Wang Signed-off-by: Xiaoyu Lu --- CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf | 2 ++ CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf | 2 ++ CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf | 2 ++ CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf | 2 ++ CryptoPkg/Library/OpensslLib/OpensslLib.inf | 1 + CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 1 + 6 files changed, 10 insertions(+) diff --git a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf b/CryptoPkg/Li= brary/BaseCryptLib/BaseCryptLib.inf index 38e25372b4b0..2a581ceac70c 100644 --- a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -96,3 +96,5 @@ [BuildOptions] # -JCryptoPkg/Include : To disable the use of the system includes provid= ed by RVCT # --diag_remark=3D1 : Reduce severity of "#1-D: last line of file en= ds without a newline" RVCT:*_*_ARM_CC_FLAGS =3D -JCryptoPkg/Include --diag_remark=3D1 + + GCC:*_CLANG38_*_CC_FLAGS =3D -std=3Dc99 diff --git a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf b/CryptoPkg/Lib= rary/BaseCryptLib/PeiCryptLib.inf index 415dda3078a8..8fdc6920ec2e 100644 --- a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf @@ -93,3 +93,5 @@ [BuildOptions] # -JCryptoPkg/Include : To disable the use of the system includes provid= ed by RVCT # --diag_remark=3D1 : Reduce severity of "#1-D: last line of file en= ds without a newline" RVCT:*_*_ARM_CC_FLAGS =3D -JCryptoPkg/Include --diag_remark=3D1 + + GCC:*_CLANG38_*_CC_FLAGS =3D -std=3Dc99 diff --git a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf b/CryptoPkg= /Library/BaseCryptLib/RuntimeCryptLib.inf index 5da5b31947bd..9d639fd01eae 100644 --- a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf @@ -101,3 +101,5 @@ [BuildOptions] # -JCryptoPkg/Include : To disable the use of the system includes provid= ed by RVCT # --diag_remark=3D1 : Reduce severity of "#1-D: last line of file en= ds without a newline" RVCT:*_*_ARM_CC_FLAGS =3D -JCryptoPkg/Include --diag_remark=3D1 + + GCC:*_CLANG38_*_CC_FLAGS =3D -std=3Dc99 diff --git a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf b/CryptoPkg/Lib= rary/BaseCryptLib/SmmCryptLib.inf index f5dd213d1ba1..c9f4abb22aea 100644 --- a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf @@ -98,3 +98,5 @@ [BuildOptions] MSFT:*_*_*_CC_FLAGS =3D /wd4090 =20 XCODE:*_*_*_CC_FLAGS =3D -mmmx -msse + + GCC:*_CLANG38_*_CC_FLAGS =3D -std=3Dc99 diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Librar= y/OpensslLib/OpensslLib.inf index f4d7772c068c..ce04d441552f 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -559,6 +559,7 @@ [BuildOptions] GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -Wno-error=3Dformat -Wno-format -Wno-error=3Dunuse= d-but-set-variable -DNO_MSABI_VA_FUNCS GCC:*_*_ARM_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uniniti= alized -Wno-error=3Dunused-but-set-variable GCC:*_*_AARCH64_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uniniti= alized -Wno-format -Wno-error=3Dunused-but-set-variable + GCC:*_CLANG38_*_CC_FLAGS =3D -std=3Dc99 -Wno-error=3Duninitialized =20 # suppress the following warnings in openssl so we don't break the build= with warnings-as-errors: # 1295: Deprecated declaration - give arg types diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/= Library/OpensslLib/OpensslLibCrypto.inf index fd12d112edb2..35430e77d344 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf @@ -520,6 +520,7 @@ [BuildOptions] GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -Wno-error=3Dformat -Wno-format -Wno-error=3Dunuse= d-but-set-variable -DNO_MSABI_VA_FUNCS GCC:*_*_ARM_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uniniti= alized -Wno-error=3Dunused-but-set-variable GCC:*_*_AARCH64_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uniniti= alized -Wno-format -Wno-error=3Dunused-but-set-variable + GCC:*_CLANG38_*_CC_FLAGS =3D -std=3Dc99 -Wno-error=3Duninitialized =20 # suppress the following warnings in openssl so we don't break the build= with warnings-as-errors: # 1295: Deprecated declaration - give arg types --=20 2.7.4 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#41593): https://edk2.groups.io/g/devel/message/41593 Mute This Topic: https://groups.io/mt/31832286/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-