]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/Source/C: Remove CPU architecture assumptions
authorMichael D Kinney <michael.d.kinney@intel.com>
Wed, 25 Nov 2020 00:25:05 +0000 (16:25 -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.

Remove build breaks in the following tools when a check against
a fixed set of CPU architectures is made.

* GenFw

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@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: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/C/GenFw/Elf32Convert.c
BaseTools/Source/C/GenFw/Elf64Convert.c

index 7f351287a93cc7e85b9d449e8436c0bfade845fd..2485b2cb7ad9a67a9d52fb236261db900b4cd94e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Elf32 Convert solution\r
 \r
-Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.<BR>\r
 Portions copyright (c) 2013, ARM Ltd. All rights reserved.<BR>\r
 Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>\r
 \r
@@ -143,8 +143,7 @@ InitializeElf32 (
     return FALSE;\r
   }\r
   if (!((mEhdr->e_machine == EM_386) || (mEhdr->e_machine == EM_ARM) || (mEhdr->e_machine == EM_RISCV))) {\r
-    Error (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf32 machine.");\r
-    return FALSE;\r
+    Warning (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf32 machine.");\r
   }\r
   if (mEhdr->e_version != EV_CURRENT) {\r
     Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);\r
index 4ed6b4477ea9310a488c5f58a3927c03b315ed78..d097db863243426ff1ead6bc995eef4a00b52cfb 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Elf64 convert solution\r
 \r
-Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.<BR>\r
 Portions copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>\r
 Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>\r
 \r
@@ -162,8 +162,7 @@ InitializeElf64 (
     return FALSE;\r
   }\r
   if (!((mEhdr->e_machine == EM_X86_64) || (mEhdr->e_machine == EM_AARCH64) || (mEhdr->e_machine == EM_RISCV64))) {\r
-    Error (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf64 machine.");\r
-    return FALSE;\r
+    Warning (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf64 machine.");\r
   }\r
   if (mEhdr->e_version != EV_CURRENT) {\r
     Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);\r