From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web12.9159.1590660945503938918 for ; Thu, 28 May 2020 03:15:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=BlPdftG0; spf=pass (domain: nuviainc.com, ip: 209.85.221.66, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f66.google.com with SMTP id l10so4505236wrr.10 for ; Thu, 28 May 2020 03:15:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ZjMR0cDv3TXK/ZwxJz2N8mTg0cD1a7WLLQDi2nMRJ6M=; b=BlPdftG0CYTesbLXIRX7N42R1ZAOkZxSRVAjUD9SWknwc6tZknjC1FgRYprf2XJSTV VhcKljpxQIIcd1ViG6NeVE9DPA8jmrrx8ra6NG/fIxev9ZZleVPjhNzTW/JkLttRnZ7z UPlMhnt33l9jnTNGK4H7w9C6lkLC+w5zA/MEL3PIknwO13f9hHrtD2l/rU1UiQG8XEs/ G63uQJFCnCkEttkiU1LXTjF9FD2X7+NZRn+Rt8J1Qv8fFHnPUVfjOfTuo8P9JiG8QgXq /xzKiMhfgOKdnLZbcdE2DPqEAw7UoVRhPF5u6Wh6uSPyY1rVYFgO+nDLMM8eayNpXenI UHYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ZjMR0cDv3TXK/ZwxJz2N8mTg0cD1a7WLLQDi2nMRJ6M=; b=DCjf9Nmk9iLb6iprJ4aCj336R6+EH71w2Noh6entIpVOKMmc4XjgsTY6T70iVEpL7w kVp2jOrq8D3yY/4aaAJSGJ3tc/lt9lNs6Evkau3rz4FFzKVGCCBeNrK1ZUcR73DTjZAH DdnT1KQo0/WSEVRf+EbzJ2G4Ira0pEuHduoSSAqlqulqjiU9da2J5s0SvZf2UF3ic8ku nDddV7c2k/nRpg1sLTrTo+SXFHamfrTgqQ6DJyqvZgqEf0qDBDwops8IydM7rECC2qHm a3VRdY0ucPNX1LB/QY8Wzhkf3QCK3cmxfHHp85wdA8HCFosgFQ8oEUpfuBETDDruJneX yHzg== X-Gm-Message-State: AOAM531Mx5fNOR4kYzKF2wAf3Mp9akYNMY/VK64IgBtts5xsSyb6P5ig V0VjKoj4ELo6zq+TQihBk/93qQ== X-Google-Smtp-Source: ABdhPJzJ11cRvut/vPCZlZr8D6Jyf1Dz1e2uEA5mMs08LyyzEQu1svS26ek7il5oyvFtZbeKwhrUxw== X-Received: by 2002:adf:feca:: with SMTP id q10mr2621713wrs.380.1590660944084; Thu, 28 May 2020 03:15:44 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id d16sm5538691wmd.42.2020.05.28.03.15.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 03:15:43 -0700 (PDT) Date: Thu, 28 May 2020 11:15:41 +0100 From: "Leif Lindholm" To: Laszlo Ersek Cc: devel@edk2.groups.io, rebecca@bsdio.com, Jian J Wang , Xiaoyu Lu , "Ard Biesheuvel (ARM address)" Subject: Re: [edk2-devel] [PATCH v2 1/1] CryptoPkg: Fix VS2017 build problem for ARM/AARCH64 Message-ID: <20200528101541.GD1923@vanye> References: <20200527160412.42938-1-rebecca@bsdio.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 27, 2020 at 20:34:02 +0200, Laszlo Ersek wrote: > +Ard, +Leif, and maybe we should consider this for edk2-stable202005? Hmm, if this has never worked on MSFT:ARM/AArch64, I don't think it would qualify even during soft freeze? (Whereas if it was a question of making it work on vs2019 afer having worked with vs2017 it would.) Don't get me wrong, I think this is excellent, but I think it can wait until after release. Will have a look at the patch itself on the original thread. Regards, Leif > 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 > > >