From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web11.3529.1590604456686426850 for ; Wed, 27 May 2020 11:34:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WKnWlAIz; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590604455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ySWSxNj2snbqbBAHk4gZ0k4XUym5V6d0gq1J11HfO4o=; b=WKnWlAIzqHjt+3ddSQpzN0SDh+h1JdF4wgHUWuzU6e7D+bRpMBv3ECca7i9lIJ5K50KULB mTuY8oJIeI6fb3cUuuUHSdlsC9RZiNkekyaZbt23Oo3F6/IBONU44K4l7RGR8Yit96/d7R Z4poAWlP/TKMDdE2g3mH5Hq9wsIGz/8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-146-oxdIDvB4PwuLSC-cZ84GOQ-1; Wed, 27 May 2020 14:34:06 -0400 X-MC-Unique: oxdIDvB4PwuLSC-cZ84GOQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CC40E8015D2; Wed, 27 May 2020 18:34:04 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-77.ams2.redhat.com [10.36.113.77]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5049D5C1B0; Wed, 27 May 2020 18:34:03 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 1/1] CryptoPkg: Fix VS2017 build problem for ARM/AARCH64 To: devel@edk2.groups.io, rebecca@bsdio.com Cc: Jian J Wang , Xiaoyu Lu , "Ard Biesheuvel (ARM address)" , "Leif Lindholm (Nuvia address)" References: <20200527160412.42938-1-rebecca@bsdio.com> From: "Laszlo Ersek" Message-ID: Date: Wed, 27 May 2020 20:34:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200527160412.42938-1-rebecca@bsdio.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit +Ard, +Leif, and maybe we should consider this for edk2-stable202005? Thanks, Laszlo On 05/27/20 18:04, Rebecca Cran wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2029 > > 1. CryptPkcs7VerifyEku.c contains internal/x509_int.h header file, this > file contains internal/refcount.h file, if _M_ARM or _M_ARM64 > defined, it will contains (intrin.h). > So we undef these flags for MSVC. It will fix include header > dependence problem(intrin.h). > > 2. ARM with MSFT toolchain was not enabled in BuildOptions, So > add CC_FLAGS for ARM/AARCH64 into OpensslLib[Crypto].inf BuildOptions > section to fix build problem. > > Cc: Jian J Wang > Signed-off-by: Xiaoyu Lu > --- > CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf | 2 ++ > CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf | 2 ++ > CryptoPkg/Library/OpensslLib/OpensslLib.inf | 2 ++ > CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 2 ++ > 4 files changed, 8 insertions(+) > > diff --git a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf > index 4aae2aba95d6..4ed5b8265563 100644 > --- a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf > +++ b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf > @@ -94,6 +94,8 @@ [BuildOptions] > # C4090: 'function' : different 'const' qualifiers > # > MSFT:*_*_*_CC_FLAGS = /wd4090 > + MSFT:*_*_ARM_CC_FLAGS = /wd4090 /U_M_ARM /U_M_ARM64 > + MSFT:*_*_AARCH64_CC_FLAGS = /wd4090 /U_M_ARM /U_M_ARM64 > > # -JCryptoPkg/Include : To disable the use of the system includes provided by RVCT > # --diag_remark=1 : Reduce severity of "#1-D: last line of file ends without a newline" > diff --git a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf > index dc28e3a11d48..0e66d935ead8 100644 > --- a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf > +++ b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf > @@ -84,6 +84,8 @@ [BuildOptions] > # C4718: 'function call' : recursive call has no side effects, deleting > # > MSFT:*_*_*_CC_FLAGS = /wd4090 /wd4718 > + MSFT:*_*_ARM_CC_FLAGS = /wd4090 /wd4718 /U_M_ARM /U_M_ARM64 > + MSFT:*_*_AARCH64_CC_FLAGS = /wd4090 /wd4718 /U_M_ARM /U_M_ARM64 > > # -JCryptoPkg/Include : To disable the use of the system includes provided by RVCT > # --diag_remark=1 : Reduce severity of "#1-D: last line of file ends without a newline" > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf > index c8ec9454bd90..c43c7bad4982 100644 > --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf > +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf > @@ -619,6 +619,8 @@ [BuildOptions] > # > MSFT:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4132 /wd4244 /wd4245 /wd4267 /wd4310 /wd4389 /wd4700 /wd4702 /wd4706 /wd4819 > MSFT:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4132 /wd4244 /wd4245 /wd4267 /wd4306 /wd4310 /wd4700 /wd4389 /wd4702 /wd4706 /wd4819 > + MSFT:*_*_ARM_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4132 /wd4244 /wd4245 /wd4267 /wd4306 /wd4310 /wd4700 /wd4389 /wd4702 /wd4706 /wd4819 > + MSFT:*_*_AARCH64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4132 /wd4244 /wd4245 /wd4267 /wd4306 /wd4310 /wd4700 /wd4389 /wd4702 /wd4706 /wd4819 > > INTEL:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w > INTEL:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > index 2f232e3e1289..594717331f68 100644 > --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > @@ -568,6 +568,8 @@ [BuildOptions] > # > MSFT:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4132 /wd4244 /wd4245 /wd4267 /wd4310 /wd4389 /wd4700 /wd4702 /wd4706 /wd4819 > MSFT:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4132 /wd4244 /wd4245 /wd4267 /wd4306 /wd4310 /wd4700 /wd4389 /wd4702 /wd4706 /wd4819 > + MSFT:*_*_ARM_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4132 /wd4244 /wd4245 /wd4267 /wd4306 /wd4310 /wd4700 /wd4389 /wd4702 /wd4706 /wd4819 > + MSFT:*_*_AARCH64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4132 /wd4244 /wd4245 /wd4267 /wd4306 /wd4310 /wd4700 /wd4389 /wd4702 /wd4706 /wd4819 > > INTEL:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w > INTEL:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w >