]> git.proxmox.com Git - mirror_edk2.git/commitdiff
CryptoPkg/Library/Include: Allow CPU specific defines to be predefined
authorMichael D Kinney <michael.d.kinney@intel.com>
Tue, 2 Feb 2021 23:26:38 +0000 (15:26 -0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 15 Apr 2021 15:58:44 +0000 (15:58 +0000)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3308

The EDK II Build Specifications do not restrict the set of
CPU architectures that can be supported.  Remove places in
the EDK II that assume a fixed set of CPU architectures.

Update SIXTY_FOUR_BIT and THIRTY_TWO_BIT defines in the
CryptoPkg to allow one of them to be predefined on the EDK II
build command line using /D flag or in DSC file [BuildOptions]
sections.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Abner Chang <abner.chang@hpe.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Abner Chang <abner.chang@hpe.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
CryptoPkg/Library/Include/CrtLibSupport.h

index 7a82f1d40633d778f05d5e20ebfebad12da32fe9..b1dff03bdc0c891f693893d502e91cd3f67e44f3 100644 (file)
@@ -2,7 +2,7 @@
   Root include file of C runtime library to support building the third-party\r
   cryptographic library.\r
 \r
-Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.<BR>\r
 Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
@@ -44,6 +44,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 \r
 #define CONFIG_HEADER_BN_H\r
 \r
+#if !defined(SIXTY_FOUR_BIT) && !defined (THIRTY_TWO_BIT)\r
 #if defined(MDE_CPU_X64) || defined(MDE_CPU_AARCH64) || defined(MDE_CPU_IA64) || defined(MDE_CPU_RISCV64)\r
 //\r
 // With GCC we would normally use SIXTY_FOUR_BIT_LONG, but MSVC needs\r
@@ -56,6 +57,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #else\r
 #error Unknown target architecture\r
 #endif\r
+#endif\r
 \r
 //\r
 // Map all va_xxxx elements to VA_xxx defined in MdePkg/Include/Base.h\r