!163 remove arch judgement at patch that support sw
From: @zhangxianting Reviewed-by: @xujing99 Signed-off-by: @xujing99
This commit is contained in:
commit
7b60c299cb
108
coreutils-9.0-sw.patch
Executable file → Normal file
108
coreutils-9.0-sw.patch
Executable file → Normal file
@ -1,10 +1,12 @@
|
|||||||
diff -Nuar coreutils-9.0.org/build-aux/config.guess coreutils-9.0.sw/build-aux/config.guess
|
diff --git a/build-aux/config.guess b/build-aux/config.guess
|
||||||
--- coreutils-9.0.org/build-aux/config.guess 2022-02-17 15:38:25.880000000 +0000
|
index e81d3ae..fc4976f 100755
|
||||||
+++ coreutils-9.0.sw/build-aux/config.guess 2022-02-17 16:03:14.150000000 +0000
|
--- a/build-aux/config.guess
|
||||||
@@ -973,6 +973,14 @@
|
+++ b/build-aux/config.guess
|
||||||
|
@@ -973,6 +973,16 @@ EOF
|
||||||
UNAME_MACHINE=aarch64_be
|
UNAME_MACHINE=aarch64_be
|
||||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||||
;;
|
;;
|
||||||
|
+#if defined (__sw_64)
|
||||||
+ sw_64:Linux:*:*)
|
+ sw_64:Linux:*:*)
|
||||||
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
|
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
|
||||||
+ sw) UNAME_MACHINE=sw_64 ;;
|
+ sw) UNAME_MACHINE=sw_64 ;;
|
||||||
@ -13,24 +15,29 @@ diff -Nuar coreutils-9.0.org/build-aux/config.guess coreutils-9.0.sw/build-aux/c
|
|||||||
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
|
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
|
||||||
+ GUESS=$UNAME_MACHINE-sunway-linux-$LIBC
|
+ GUESS=$UNAME_MACHINE-sunway-linux-$LIBC
|
||||||
+ ;;
|
+ ;;
|
||||||
|
+#endif
|
||||||
alpha:Linux:*:*)
|
alpha:Linux:*:*)
|
||||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
|
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
|
||||||
EV5) UNAME_MACHINE=alphaev5 ;;
|
EV5) UNAME_MACHINE=alphaev5 ;;
|
||||||
diff -Nuar coreutils-9.0.org/build-aux/config.sub coreutils-9.0.sw/build-aux/config.sub
|
diff --git a/build-aux/config.sub b/build-aux/config.sub
|
||||||
--- coreutils-9.0.org/build-aux/config.sub 2022-02-17 15:38:25.880000000 +0000
|
index d74fb6d..b5b01c1 100755
|
||||||
+++ coreutils-9.0.sw/build-aux/config.sub 2022-02-17 16:03:30.560000000 +0000
|
--- a/build-aux/config.sub
|
||||||
@@ -1177,6 +1177,7 @@
|
+++ b/build-aux/config.sub
|
||||||
|
@@ -1177,6 +1177,9 @@ case $cpu-$vendor in
|
||||||
| a29k \
|
| a29k \
|
||||||
| aarch64 | aarch64_be \
|
| aarch64 | aarch64_be \
|
||||||
| abacus \
|
| abacus \
|
||||||
|
+#if defined (__sw_64)
|
||||||
+ | sw_64 \
|
+ | sw_64 \
|
||||||
|
+#endif
|
||||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
|
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
|
||||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
|
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
|
||||||
| alphapca5[67] | alpha64pca5[67] \
|
| alphapca5[67] | alpha64pca5[67] \
|
||||||
diff -Nuar coreutils-9.0.org/configure coreutils-9.0.sw/configure
|
diff --git a/configure b/configure
|
||||||
--- coreutils-9.0.org/configure 2022-02-17 15:38:26.280000000 +0000
|
index ee54aad..dd92158 100755
|
||||||
+++ coreutils-9.0.sw/configure 2022-02-17 15:58:05.480000000 +0000
|
--- a/configure
|
||||||
@@ -7845,6 +7845,12 @@
|
+++ b/configure
|
||||||
|
@@ -7845,6 +7845,12 @@ printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
|
||||||
# (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
|
# (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
|
||||||
# and the GCC 4.1.2 manual).
|
# and the GCC 4.1.2 manual).
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
@ -43,42 +50,46 @@ diff -Nuar coreutils-9.0.org/configure coreutils-9.0.sw/configure
|
|||||||
alpha*)
|
alpha*)
|
||||||
# On Alpha systems, a compiler option provides the behaviour.
|
# On Alpha systems, a compiler option provides the behaviour.
|
||||||
# See the ieee(3) manual page, also available at
|
# See the ieee(3) manual page, also available at
|
||||||
@@ -18808,7 +18814,7 @@
|
@@ -18808,7 +18814,7 @@ else $as_nop
|
||||||
case "$gl_cv_host_cpu_c_abi" in
|
case "$gl_cv_host_cpu_c_abi" in
|
||||||
i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
|
i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
|
||||||
gl_cv_host_cpu_c_abi_32bit=yes ;;
|
gl_cv_host_cpu_c_abi_32bit=yes ;;
|
||||||
- x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
|
- x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
|
||||||
+ x86_64 | sw_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
|
+ x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | sw_64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
|
||||||
gl_cv_host_cpu_c_abi_32bit=no ;;
|
gl_cv_host_cpu_c_abi_32bit=no ;;
|
||||||
*)
|
*)
|
||||||
gl_cv_host_cpu_c_abi_32bit=unknown ;;
|
gl_cv_host_cpu_c_abi_32bit=unknown ;;
|
||||||
@@ -18837,7 +18843,7 @@
|
@@ -18838,7 +18844,7 @@ else $as_nop
|
||||||
;;
|
|
||||||
|
|
||||||
# CPUs that only support a 64-bit ABI.
|
# CPUs that only support a 64-bit ABI.
|
||||||
- alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
|
alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
|
||||||
+ sw_64* | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
|
- | mmix )
|
||||||
| mmix )
|
+ | sw_64* | mmix )
|
||||||
gl_cv_host_cpu_c_abi_32bit=no
|
gl_cv_host_cpu_c_abi_32bit=no
|
||||||
;;
|
;;
|
||||||
diff -Nuar coreutils-9.0.org/lib/uname.c coreutils-9.0.sw/lib/uname.c
|
|
||||||
--- coreutils-9.0.org/lib/uname.c 2022-02-17 15:38:26.740000000 +0000
|
diff --git a/lib/uname.c b/lib/uname.c
|
||||||
+++ coreutils-9.0.sw/lib/uname.c 2022-02-17 15:59:09.500000000 +0000
|
index adb9d98..0d6284b 100644
|
||||||
@@ -228,6 +228,10 @@
|
--- a/lib/uname.c
|
||||||
|
+++ b/lib/uname.c
|
||||||
|
@@ -228,6 +228,12 @@ uname (struct utsname *buf)
|
||||||
case PROCESSOR_ARCHITECTURE_MIPS:
|
case PROCESSOR_ARCHITECTURE_MIPS:
|
||||||
strcpy (buf->machine, "mips");
|
strcpy (buf->machine, "mips");
|
||||||
break;
|
break;
|
||||||
|
+#if defined (__sw_64)
|
||||||
+ case PROCESSOR_ARCHITECTURE_SW_64:
|
+ case PROCESSOR_ARCHITECTURE_SW_64:
|
||||||
+ case PROCESSOR_ARCHITECTURE_SW_6464:
|
+ case PROCESSOR_ARCHITECTURE_SW_6464:
|
||||||
+ strcpy (buf->machine, "sw_64");
|
+ strcpy (buf->machine, "sw_64");
|
||||||
+ break;
|
+ break;
|
||||||
|
+#endif
|
||||||
case PROCESSOR_ARCHITECTURE_ALPHA:
|
case PROCESSOR_ARCHITECTURE_ALPHA:
|
||||||
case PROCESSOR_ARCHITECTURE_ALPHA64:
|
case PROCESSOR_ARCHITECTURE_ALPHA64:
|
||||||
strcpy (buf->machine, "alpha");
|
strcpy (buf->machine, "alpha");
|
||||||
diff -Nuar coreutils-9.0.org/m4/fpieee.m4 coreutils-9.0.sw/m4/fpieee.m4
|
diff --git a/m4/fpieee.m4 b/m4/fpieee.m4
|
||||||
--- coreutils-9.0.org/m4/fpieee.m4 2022-02-17 15:38:25.890000000 +0000
|
index 3f16957..7a6010b 100644
|
||||||
+++ coreutils-9.0.sw/m4/fpieee.m4 2022-02-17 15:41:57.490000000 +0000
|
--- a/m4/fpieee.m4
|
||||||
@@ -30,6 +30,12 @@
|
+++ b/m4/fpieee.m4
|
||||||
|
@@ -30,6 +30,12 @@ AC_DEFUN([gl_FP_IEEE],
|
||||||
# (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
|
# (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
|
||||||
# and the GCC 4.1.2 manual).
|
# and the GCC 4.1.2 manual).
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
@ -91,23 +102,24 @@ diff -Nuar coreutils-9.0.org/m4/fpieee.m4 coreutils-9.0.sw/m4/fpieee.m4
|
|||||||
alpha*)
|
alpha*)
|
||||||
# On Alpha systems, a compiler option provides the behaviour.
|
# On Alpha systems, a compiler option provides the behaviour.
|
||||||
# See the ieee(3) manual page, also available at
|
# See the ieee(3) manual page, also available at
|
||||||
diff -Nuar coreutils-9.0.org/m4/host-cpu-c-abi.m4 coreutils-9.0.sw/m4/host-cpu-c-abi.m4
|
diff --git a/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4
|
||||||
--- coreutils-9.0.org/m4/host-cpu-c-abi.m4 2022-02-17 15:38:25.900000000 +0000
|
index 64e28b1..e2833aa 100644
|
||||||
+++ coreutils-9.0.sw/m4/host-cpu-c-abi.m4 2022-02-17 15:41:29.970000000 +0000
|
--- a/m4/host-cpu-c-abi.m4
|
||||||
@@ -91,6 +91,12 @@
|
+++ b/m4/host-cpu-c-abi.m4
|
||||||
|
@@ -90,6 +90,12 @@ changequote([,])dnl
|
||||||
|
[gl_cv_host_cpu_c_abi=i386])
|
||||||
;;
|
;;
|
||||||
|
|
||||||
changequote(,)dnl
|
+changequote(,)dnl
|
||||||
+ sw_64* )
|
+ sw_64* )
|
||||||
+changequote([,])dnl
|
+changequote([,])dnl
|
||||||
+ gl_cv_host_cpu_c_abi=sw_64
|
+ gl_cv_host_cpu_c_abi=sw_64
|
||||||
+ ;;
|
+ ;;
|
||||||
+
|
+
|
||||||
+changequote(,)dnl
|
changequote(,)dnl
|
||||||
alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
|
alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
gl_cv_host_cpu_c_abi=alpha
|
@@ -355,6 +361,9 @@ EOF
|
||||||
@@ -355,6 +361,9 @@
|
|
||||||
#ifndef __x86_64__
|
#ifndef __x86_64__
|
||||||
#undef __x86_64__
|
#undef __x86_64__
|
||||||
#endif
|
#endif
|
||||||
@ -117,28 +129,29 @@ diff -Nuar coreutils-9.0.org/m4/host-cpu-c-abi.m4 coreutils-9.0.sw/m4/host-cpu-c
|
|||||||
#ifndef __alpha__
|
#ifndef __alpha__
|
||||||
#undef __alpha__
|
#undef __alpha__
|
||||||
#endif
|
#endif
|
||||||
@@ -468,7 +477,7 @@
|
@@ -468,7 +477,7 @@ AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
|
||||||
case "$gl_cv_host_cpu_c_abi" in
|
case "$gl_cv_host_cpu_c_abi" in
|
||||||
i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
|
i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
|
||||||
gl_cv_host_cpu_c_abi_32bit=yes ;;
|
gl_cv_host_cpu_c_abi_32bit=yes ;;
|
||||||
- x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
|
- x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
|
||||||
+ x86_64 | sw_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
|
+ x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | sw_64 | riscv*-lp64* | s390x | sparc64 )
|
||||||
gl_cv_host_cpu_c_abi_32bit=no ;;
|
gl_cv_host_cpu_c_abi_32bit=no ;;
|
||||||
*)
|
*)
|
||||||
gl_cv_host_cpu_c_abi_32bit=unknown ;;
|
gl_cv_host_cpu_c_abi_32bit=unknown ;;
|
||||||
@@ -498,7 +507,7 @@
|
@@ -499,7 +508,7 @@ AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
|
||||||
|
|
||||||
# CPUs that only support a 64-bit ABI.
|
# CPUs that only support a 64-bit ABI.
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
- alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
|
alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
|
||||||
+ sw_64* | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
|
- | mmix )
|
||||||
| mmix )
|
+ | sw_64* | mmix )
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
gl_cv_host_cpu_c_abi_32bit=no
|
gl_cv_host_cpu_c_abi_32bit=no
|
||||||
diff -Nuar coreutils-9.0.org/src/longlong.h coreutils-9.0.sw/src/longlong.h
|
;;
|
||||||
--- coreutils-9.0.org/src/longlong.h 2022-02-17 15:38:26.750000000 +0000
|
diff --git a/src/longlong.h b/src/longlong.h
|
||||||
+++ coreutils-9.0.sw/src/longlong.h 2022-02-17 15:55:26.520000000 +0000
|
index fbd3716..c99a554 100644
|
||||||
@@ -170,6 +170,92 @@
|
--- a/src/longlong.h
|
||||||
|
+++ b/src/longlong.h
|
||||||
|
@@ -170,6 +170,92 @@ along with this file. If not, see https://www.gnu.org/licenses/. */
|
||||||
don't need to be under !NO_ASM */
|
don't need to be under !NO_ASM */
|
||||||
#if ! defined (NO_ASM)
|
#if ! defined (NO_ASM)
|
||||||
|
|
||||||
@ -231,3 +244,6 @@ diff -Nuar coreutils-9.0.org/src/longlong.h coreutils-9.0.sw/src/longlong.h
|
|||||||
#if defined (__alpha) && W_TYPE_SIZE == 64
|
#if defined (__alpha) && W_TYPE_SIZE == 64
|
||||||
/* Most alpha-based machines, except Cray systems. */
|
/* Most alpha-based machines, except Cray systems. */
|
||||||
#if defined (__GNUC__)
|
#if defined (__GNUC__)
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
Name: coreutils
|
Name: coreutils
|
||||||
Version: 9.4
|
Version: 9.4
|
||||||
Release: 6
|
Release: 7
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Summary: A set of basic GNU tools commonly used in shell scripts
|
Summary: A set of basic GNU tools commonly used in shell scripts
|
||||||
Url: https://www.gnu.org/software/coreutils/
|
Url: https://www.gnu.org/software/coreutils/
|
||||||
@ -29,10 +29,7 @@ patch14: backport-cat-don-t-trust-st_size-on-proc-files.patch
|
|||||||
patch15: backport-dd-don-t-trust-st_size-on-proc-files.patch
|
patch15: backport-dd-don-t-trust-st_size-on-proc-files.patch
|
||||||
patch16: backport-split-don-t-trust-st_size-on-proc-files.patch
|
patch16: backport-split-don-t-trust-st_size-on-proc-files.patch
|
||||||
|
|
||||||
%ifarch sw_64
|
|
||||||
Patch9001: coreutils-9.0-sw.patch
|
Patch9001: coreutils-9.0-sw.patch
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
Conflicts: filesystem < 3
|
Conflicts: filesystem < 3
|
||||||
# To avoid clobbering installs
|
# To avoid clobbering installs
|
||||||
@ -163,6 +160,9 @@ fi
|
|||||||
%{_mandir}/man*/*
|
%{_mandir}/man*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 25 2024 zhangxianting <zhangxianting@uniontech.com> - 9.4-7
|
||||||
|
- remove arch judgement at patch that support sw
|
||||||
|
|
||||||
* Mon Jun 24 2024 huyubiao <huyubiao@huawei.com> - 9.4-6
|
* Mon Jun 24 2024 huyubiao <huyubiao@huawei.com> - 9.4-6
|
||||||
- backport patches from community
|
- backport patches from community
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user