!4 [sync] PR-3: 添加sw架构

From: @openeuler-sync-bot 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
This commit is contained in:
openeuler-ci-bot 2022-11-08 11:20:13 +00:00 committed by Gitee
commit acfeb11ae8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 54 additions and 1 deletions

49
yasm-1.3.0-sw.patch Executable file
View File

@ -0,0 +1,49 @@
diff -Nuar yasm-1.3.0.org/configure yasm-1.3.0.sw/configure
--- yasm-1.3.0.org/configure 2022-05-26 14:47:18.140000000 +0000
+++ yasm-1.3.0.sw/configure 2022-05-26 14:50:16.340000000 +0000
@@ -10262,7 +10262,7 @@
typedef unsigned long long uint64_t;
#endif
-#elif defined __alpha || (defined __mips && defined _ABIN32)
+#elif defined __alpha || defined __sw_64 || (defined __mips && defined _ABIN32)
#if !defined _NO_LONGLONG
typedef long int64_t;
typedef unsigned long uint64_t;
diff -Nuar yasm-1.3.0.org/m4/ax_create_stdint_h.m4 yasm-1.3.0.sw/m4/ax_create_stdint_h.m4
--- yasm-1.3.0.org/m4/ax_create_stdint_h.m4 2022-05-26 14:47:18.330000000 +0000
+++ yasm-1.3.0.sw/m4/ax_create_stdint_h.m4 2022-05-26 14:47:53.800000000 +0000
@@ -392,7 +392,7 @@
typedef unsigned long long uint64_t;
#endif
-#elif defined __alpha || (defined __mips && defined _ABIN32)
+#elif defined __alpha || defined _sw_64 || (defined __mips && defined _ABIN32)
#if !defined _NO_LONGLONG
typedef long int64_t;
typedef unsigned long uint64_t;
diff -Nuar yasm-1.3.0.org/m4/intdiv0.m4 yasm-1.3.0.sw/m4/intdiv0.m4
--- yasm-1.3.0.org/m4/intdiv0.m4 2022-05-26 14:47:18.330000000 +0000
+++ yasm-1.3.0.sw/m4/intdiv0.m4 2022-05-26 14:48:19.760000000 +0000
@@ -54,7 +54,7 @@
[
# Guess based on the CPU.
case "$host_cpu" in
- alpha* | i[34567]86 | m68k | s390*)
+ alpha* | sw_64* | i[34567]86 | m68k | s390*)
gt_cv_int_divbyzero_sigfpe="guessing yes";;
*)
gt_cv_int_divbyzero_sigfpe="guessing no";;
diff -Nuar yasm-1.3.0.org/modules/objfmts/elf/elf.h yasm-1.3.0.sw/modules/objfmts/elf/elf.h
--- yasm-1.3.0.org/modules/objfmts/elf/elf.h 2022-05-26 14:47:18.250000000 +0000
+++ yasm-1.3.0.sw/modules/objfmts/elf/elf.h 2022-05-26 14:56:18.410000000 +0000
@@ -75,7 +75,8 @@
EM_SPARCV9 = 43, /* SPARC v9 64-bit */
EM_IA_64 = 50, /* Intel IA-64 */
EM_X86_64 = 62, /* AMD x86-64 */
- EM_ALPHA = 0x9026 /* Alpha (no ABI) */
+ EM_ALPHA = 0x9026, /* Alpha (no ABI) */
+ EM_SW_64 = 0x9916 /* Sw_64 (no ABI) */
} elf_machine;
typedef enum {

View File

@ -1,10 +1,11 @@
Name: yasm
Version: 1.3.0
Release: 9
Release: 10
Summary: NASM assembler
License: BSD
URL: http://yasm.tortall.net/
Source0: http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
Patch1: yasm-1.3.0-sw.patch
BuildRequires: gcc bison byacc gettext-devel xmlto
Provides: bundled(md5-plumb)
@ -46,5 +47,8 @@ rm -rf %{buildroot}
%{_mandir}/*
%changelog
* Wed Oct 26 2022 wuzx<wuzx1226@qq.com> - 1.3.0-10
- Add sw64 architecture
* Mon Jan 6 2020 qinjian <qinjian18@huawei.com> - 1.3.0-9
- Package init