From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com []) by mx.groups.io with SMTP id smtpd.web08.8028.1618370887686814136 for ; Tue, 13 Apr 2021 20:28:08 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: michael.d.kinney@intel.com) IronPort-SDR: aVKB0B3Sc6kkVuOSqAe/YwBvHo4K04PCJtof2LkHWxZb4t7mZmljuzsnQ1eHkR/0wYrPziOIor VZeLcS2F2n1Q== X-IronPort-AV: E=McAfee;i="6200,9189,9953"; a="181679509" X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="181679509" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 20:28:07 -0700 IronPort-SDR: yojgtPg77bGjQYH63D2m9omjJTKjhIG1pUUbrUgUOnYkcHiJRXGAC9+C/FfyhT/f7H9c8JhMaH 8EKa5AHtAIDA== X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="418124855" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.255.231.15]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 20:28:07 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen , Andrew Fish , Abner Chang Subject: [Patch v2 3/4] BaseTools/Source/C: Remove CPU architecture assumptions Date: Tue, 13 Apr 2021 20:27:57 -0700 Message-Id: <20210414032758.1818-4-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20210414032758.1818-1-michael.d.kinney@intel.com> References: <20210414032758.1818-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Liming Gao Cc: Yuwei Chen Cc: Andrew Fish Cc: Abner Chang Signed-off-by: Michael D Kinney --- BaseTools/Source/C/GenFw/Elf32Convert.c | 5 ++--- BaseTools/Source/C/GenFw/Elf64Convert.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/GenFw/Elf32Convert.c index 7f351287a93c..2485b2cb7ad9 100644 --- a/BaseTools/Source/C/GenFw/Elf32Convert.c +++ b/BaseTools/Source/C/GenFw/Elf32Convert.c @@ -1,7 +1,7 @@ /** @file Elf32 Convert solution -Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.
Portions copyright (c) 2013, ARM Ltd. All rights reserved.
Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.
@@ -143,8 +143,7 @@ InitializeElf32 ( return FALSE; } if (!((mEhdr->e_machine == EM_386) || (mEhdr->e_machine == EM_ARM) || (mEhdr->e_machine == EM_RISCV))) { - Error (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf32 machine."); - return FALSE; + Warning (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf32 machine."); } if (mEhdr->e_version != EV_CURRENT) { Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT); diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c index 4ed6b4477ea9..d097db863243 100644 --- a/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -1,7 +1,7 @@ /** @file Elf64 convert solution -Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.
Portions copyright (c) 2013-2014, ARM Ltd. All rights reserved.
Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.
@@ -162,8 +162,7 @@ InitializeElf64 ( return FALSE; } if (!((mEhdr->e_machine == EM_X86_64) || (mEhdr->e_machine == EM_AARCH64) || (mEhdr->e_machine == EM_RISCV64))) { - Error (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf64 machine."); - return FALSE; + Warning (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf64 machine."); } if (mEhdr->e_version != EV_CURRENT) { Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT); -- 2.31.1.windows.1