diff --git a/mstflint-4.10.0-sw.patch b/mstflint-4.10.0-sw.patch new file mode 100755 index 0000000000000000000000000000000000000000..687118fe97dc7d03a5b7170db5227628dc567b09 --- /dev/null +++ b/mstflint-4.10.0-sw.patch @@ -0,0 +1,63 @@ +diff -Naur mstflint-4.10.0.org/common/compatibility.h mstflint-4.10.0.sw/common/compatibility.h +--- mstflint-4.10.0.org/common/compatibility.h 2022-05-27 11:07:58.390000000 +0000 ++++ mstflint-4.10.0.sw/common/compatibility.h 2022-05-27 11:20:13.920000000 +0000 +@@ -40,7 +40,7 @@ + + #include + +-#if defined(__ia64__) || defined(__x86_64__) || defined(__PPC64__) || defined(__arm__) ++#if defined(__ia64__) || defined(__x86_64__) || defined(__PPC64__) || defined(__arm__) || defined(__sw_64__) + #define U64L "l" + #else + #define U64L "ll" +@@ -63,6 +63,8 @@ + # define ARCH_arm64 + # elif defined(__arm__) + # define ARCH_arm6l ++# elif defined(__sw_64__) ++# define ARCH_sw_64 + # else + # error Unknown CPU architecture using the linux OS + # endif +@@ -109,7 +111,7 @@ + # define U48H_FMT "0x%012llx" + # define U64D_FMT_GEN "llu" + # endif +-#elif defined(ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(ARCH_arm64) ++#elif defined(ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(ARCH_arm64) || defined(ARCH_sw_64) + # define U64D_FMT "%lu" + # define U64H_FMT "0x%016lx" + # define U48H_FMT "0x%012lx" +diff -Naur mstflint-4.10.0.org/mtcr_ul/packets_common.h mstflint-4.10.0.sw/mtcr_ul/packets_common.h +--- mstflint-4.10.0.org/mtcr_ul/packets_common.h 2022-05-27 11:07:58.400000000 +0000 ++++ mstflint-4.10.0.sw/mtcr_ul/packets_common.h 2022-05-27 11:10:09.880000000 +0000 +@@ -152,6 +152,8 @@ + # define ARCH_arm64 + # elif defined(__arm__) + # define ARCH_arm6l ++# elif defined(__sw_64__) ++# define ARCH_sw_64 + # else + # error Unknown CPU architecture using the linux OS + # endif +diff -Naur mstflint-4.10.0.org/tools_layouts/adb_to_c_utils.h mstflint-4.10.0.sw/tools_layouts/adb_to_c_utils.h +--- mstflint-4.10.0.org/tools_layouts/adb_to_c_utils.h 2022-05-27 11:07:58.500000000 +0000 ++++ mstflint-4.10.0.sw/tools_layouts/adb_to_c_utils.h 2022-05-27 11:09:31.900000000 +0000 +@@ -137,6 +137,8 @@ + # define ARCH_arm64 + # elif defined(__arm__) + # define ARCH_arm6l ++# elif defined(__sw_64__) ++# define ARCH_sw_64 + # else + # error Unknown CPU architecture using the linux OS + # endif +@@ -180,7 +182,7 @@ + # define U64H_FMT "0x%016llx" + # define U48H_FMT "0x%012llx" + # endif +-#elif defined (ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(ARCH_arm64) ++#elif defined (ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(ARCH_arm64) || defined(ARCH_sw_64) + # define U64D_FMT "%lu" + # define U64H_FMT "0x%016lx" + # define U48H_FMT "0x%012lx" diff --git a/mstflint.spec b/mstflint.spec index 70186088afe8d3bdd5de2ced3ac159d7248433b9..7405263b1d7c4df5f652dd4985d4fa4d0ded3a00 100644 --- a/mstflint.spec +++ b/mstflint.spec @@ -1,12 +1,13 @@ Name: mstflint Summary: Firmware Burning and Diagnostics Tools Version: 4.10.0 -Release: 7 +Release: 8 License: GPLv2+ or BSD Url: https://github.com/Mellanox/mstflint Source: https://github.com/Mellanox/%{name}/releases/download/v4.10.0-2/%{name}-%{version}.tar.gz Patch0000: 0001-Fix-compile-errors.patch Patch0001: fix-return-local-addr.patch +Patch0002: mstflint-4.10.0-sw.patch BuildRequires: libstdc++-devel zlib-devel rdma-core-devel gcc-c++ gcc BuildRequires: libcurl-devel boost-devel libxml2-devel openssl-devel @@ -44,6 +45,9 @@ export CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" %{_mandir}/man1/* %changelog +* Mon Oct 24 2022 wuzx - 4.10.0-8 +- Add sw64 architecture + * Tue Aug 4 2021 shdluan@163.com - 4.10.0-7 - fix return local addr