public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 1/1] CryptoPkg: Fix VS2017 build problem for ARM/AARCH64
@ 2020-05-27 16:04 Rebecca Cran
  2020-05-27 18:34 ` [edk2-devel] " Laszlo Ersek
  2020-05-28  0:23 ` Guomin Jiang
  0 siblings, 2 replies; 5+ messages in thread
From: Rebecca Cran @ 2020-05-27 16:04 UTC (permalink / raw)
  To: devel; +Cc: Rebecca Cran, Jian J Wang, Xiaoyu Lu

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 <jian.j.wang@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
---
 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
-- 
2.26.2.windows.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v2 1/1] CryptoPkg: Fix VS2017 build problem for ARM/AARCH64
  2020-05-27 16:04 [PATCH v2 1/1] CryptoPkg: Fix VS2017 build problem for ARM/AARCH64 Rebecca Cran
@ 2020-05-27 18:34 ` Laszlo Ersek
  2020-05-28 10:15   ` Leif Lindholm
  2020-05-28  0:23 ` Guomin Jiang
  1 sibling, 1 reply; 5+ messages in thread
From: Laszlo Ersek @ 2020-05-27 18:34 UTC (permalink / raw)
  To: devel, rebecca
  Cc: Jian J Wang, Xiaoyu Lu, Ard Biesheuvel (ARM address),
	Leif Lindholm (Nuvia address)

+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 <jian.j.wang@intel.com>
> Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
> ---
>  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
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v2 1/1] CryptoPkg: Fix VS2017 build problem for ARM/AARCH64
  2020-05-27 16:04 [PATCH v2 1/1] CryptoPkg: Fix VS2017 build problem for ARM/AARCH64 Rebecca Cran
  2020-05-27 18:34 ` [edk2-devel] " Laszlo Ersek
@ 2020-05-28  0:23 ` Guomin Jiang
  1 sibling, 0 replies; 5+ messages in thread
From: Guomin Jiang @ 2020-05-28  0:23 UTC (permalink / raw)
  To: devel@edk2.groups.io, rebecca@bsdio.com; +Cc: Wang, Jian J, Lu, XiaoyuX

I think it is good to me.
Reviewed-by: Guomin Jiang <guomin.jiang@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Rebecca
> Cran
> Sent: Thursday, May 28, 2020 12:04 AM
> To: devel@edk2.groups.io
> Cc: Rebecca Cran <rebecca@bsdio.com>; Wang, Jian J
> <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>
> Subject: [edk2-devel] [PATCH v2 1/1] CryptoPkg: Fix VS2017 build problem
> for ARM/AARCH64
> 
> 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 <jian.j.wang@intel.com>
> Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
> ---
>  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
> --
> 2.26.2.windows.1
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v2 1/1] CryptoPkg: Fix VS2017 build problem for ARM/AARCH64
  2020-05-27 18:34 ` [edk2-devel] " Laszlo Ersek
@ 2020-05-28 10:15   ` Leif Lindholm
  2020-05-28 20:03     ` Laszlo Ersek
  0 siblings, 1 reply; 5+ messages in thread
From: Leif Lindholm @ 2020-05-28 10:15 UTC (permalink / raw)
  To: Laszlo Ersek
  Cc: devel, rebecca, Jian J Wang, Xiaoyu Lu,
	Ard Biesheuvel (ARM address)

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 <jian.j.wang@intel.com>
> > Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
> > ---
> >  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
> > 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v2 1/1] CryptoPkg: Fix VS2017 build problem for ARM/AARCH64
  2020-05-28 10:15   ` Leif Lindholm
@ 2020-05-28 20:03     ` Laszlo Ersek
  0 siblings, 0 replies; 5+ messages in thread
From: Laszlo Ersek @ 2020-05-28 20:03 UTC (permalink / raw)
  To: Leif Lindholm
  Cc: devel, rebecca, Jian J Wang, Xiaoyu Lu,
	Ard Biesheuvel (ARM address)

On 05/28/20 12:15, Leif Lindholm wrote:
> 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.

Thanks for reviewing the situation!
Laszlo

> 
> 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 <jian.j.wang@intel.com>
>>> Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
>>> ---
>>>  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
>>>
>>
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-28 20:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-27 16:04 [PATCH v2 1/1] CryptoPkg: Fix VS2017 build problem for ARM/AARCH64 Rebecca Cran
2020-05-27 18:34 ` [edk2-devel] " Laszlo Ersek
2020-05-28 10:15   ` Leif Lindholm
2020-05-28 20:03     ` Laszlo Ersek
2020-05-28  0:23 ` Guomin Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox