From 65a74f55bdd5e24ab067f442ea2fa9a16a357885 Mon Sep 17 00:00:00 2001 From: yangchenguang Date: Sun, 4 Feb 2024 11:40:49 +0800 Subject: [PATCH] icu already supports loongarch64 architecture Remove loongarch64 patch and modify sw_64 support patch to use all arch Signed-off-by: yangchenguang (cherry picked from commit 4496cd7a8c3995aed679d119a450261895a99b70) --- 0001-add-support-loongarch64.patch | 27 --- icu-Add-sw64-architecture.patch | 308 +---------------------------- icu.spec | 17 +- 3 files changed, 19 insertions(+), 333 deletions(-) delete mode 100644 0001-add-support-loongarch64.patch diff --git a/0001-add-support-loongarch64.patch b/0001-add-support-loongarch64.patch deleted file mode 100644 index 52031c5..0000000 --- a/0001-add-support-loongarch64.patch +++ /dev/null @@ -1,27 +0,0 @@ -From beefaa392eaf51355f9a3806a004c762d1ce17fa Mon Sep 17 00:00:00 2001 -From: Jingyun Hua -Date: Fri, 18 Nov 2022 09:00:58 +0000 -Subject: [PATCH] add support loongarch64 - -Signed-off-by: Jingyun Hua ---- - source/i18n/double-conversion-utils.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/source/i18n/double-conversion-utils.h b/source/i18n/double-conversion-utils.h -index 303668f..77f5ded 100644 ---- a/source/i18n/double-conversion-utils.h -+++ b/source/i18n/double-conversion-utils.h -@@ -160,7 +160,8 @@ int main(int argc, char** argv) { - defined(__riscv) || defined(__e2k__) || \ - defined(__or1k__) || defined(__arc__) || defined(__ARC64__) || \ - defined(__microblaze__) || defined(__XTENSA__) || \ -- defined(__EMSCRIPTEN__) || defined(__wasm32__) -+ defined(__EMSCRIPTEN__) || defined(__wasm32__) || \ -+ defined(__loongarch__) - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(__mc68000__) || \ - defined(__pnacl__) || defined(__native_client__) --- -2.33.0 - diff --git a/icu-Add-sw64-architecture.patch b/icu-Add-sw64-architecture.patch index d9f639b..0da741d 100644 --- a/icu-Add-sw64-architecture.patch +++ b/icu-Add-sw64-architecture.patch @@ -1,306 +1,18 @@ -From a4fb55ae3de789cf645d4939ed8af9dbaad242ce Mon Sep 17 00:00:00 2001 -From: wuzx -Date: Fri, 18 Nov 2022 02:53:10 +0800 -Subject: [PATCH] Add sw64 architecture +From ff578091c9a4caf0fa8ae777959eaa79587ae00b Mon Sep 17 00:00:00 2001 +From: yangchenguang +Date: Sun, 4 Feb 2024 10:48:30 +0800 +Subject: [PATCH] Add sw_64 support -Signed-off-by: wuzx +Signed-off-by: yangchenguang --- - source/acinclude.m4 | 6 ++ - source/config.guess | 8 +++ - source/config.sub | 2 + - source/config/mh-sw_64-linux-cc | 87 +++++++++++++++++++++++++++ - source/config/mh-sw_64-linux-gcc | 85 ++++++++++++++++++++++++++ - source/configure | 8 ++- - source/configure.ac | 2 +- - source/i18n/double-conversion-utils.h | 2 +- - 8 files changed, 197 insertions(+), 3 deletions(-) - create mode 100644 source/config/mh-sw_64-linux-cc - create mode 100644 source/config/mh-sw_64-linux-gcc + source/i18n/double-conversion-utils.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/source/acinclude.m4 b/source/acinclude.m4 -index 507f41f..381a91f 100644 ---- a/source/acinclude.m4 -+++ b/source/acinclude.m4 -@@ -21,6 +21,12 @@ case "${host}" in - else - icu_cv_host_frag=mh-solaris - fi ;; -+sw_64*-*-linux-gnu) -+ if test "$GCC" = yes; then -+ icu_cv_host_frag=mh-sw_64-linux-gcc -+ else -+ icu_cv_host_frag=mh-sw_64-linux-cc -+ fi ;; - alpha*-*-linux-gnu) - if test "$GCC" = yes; then - icu_cv_host_frag=mh-alpha-linux-gcc -diff --git a/source/config.guess b/source/config.guess -index 31e01ef..1dfe5d5 100644 ---- a/source/config.guess -+++ b/source/config.guess -@@ -894,6 +894,14 @@ EOF - UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; -+ sw_64:Linux:*:*) -+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -+ SW) UNAME_MACHINE=sw_64 ;; -+ esac -+ objdump --private-headers /bin/sh | grep -q ld.so.1 -+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi -+ echo ${UNAME_MACHINE}-sunway-linux-${LIBC} -+ exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; -diff --git a/source/config.sub b/source/config.sub -index fb57947..07dc65e 100644 ---- a/source/config.sub -+++ b/source/config.sub -@@ -244,6 +244,7 @@ case $basic_machine in - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ -+ | sw_64 \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -@@ -368,6 +369,7 @@ case $basic_machine in - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ -+ | sw_64-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ -diff --git a/source/config/mh-sw_64-linux-cc b/source/config/mh-sw_64-linux-cc -new file mode 100644 -index 0000000..f27259a ---- /dev/null -+++ b/source/config/mh-sw_64-linux-cc -@@ -0,0 +1,87 @@ -+## -*-makefile-*- -+## Copyright (C) 2016 and later: Unicode, Inc. and others. -+## License & terms of use: http://www.unicode.org/copyright.html -+## Sw-64-Linux-specific setup -+## Copyright (c) 1999-2006, International Business Machines Corporation and -+## others. All Rights Reserved. -+ -+## Commands to generate dependency files -+#GEN_DEPS.c= $(CC) $(DEFS) $(CPPFLAGS) -MD -c -msg_quiet -+#GEN_DEPS.cc= $(CXX) $(DEFS) $(CPPFLAGS) -D__USE_STD_IOSTREAM -c -MD -msg_quiet -+ -+## Flags for position independent code -+SHAREDLIBCFLAGS = -fPIC -+SHAREDLIBCXXFLAGS = -fPIC -+SHAREDLIBCPPFLAGS = -DPIC -+ -+## Additional flags when building libraries and with threads -+THREADSCPPFLAGS = -D_REENTRANT -+LIBCPPFLAGS = -+ -+# The tests need complete IEEE floating point support -+CFLAGS += -ieee -+CXXFLAGS += -ieee -+ -+## Commands to compile -+COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -signed -accept nogccinline -+COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c -signed -D__USE_STD_IOSTREAM -accept nogcc_inline -+ -+ -+## Commands to link -+LINK.c= $(CC) -call_shared $(CFLAGS) $(LDFLAGS) -+LINK.cc= $(CXX) -call_shared $(CXXFLAGS) $(LDFLAGS) -+ -+## Compiler switch to embed a runtime search path -+LD_RPATH= -+LD_RPATH_PRE= -Wl,-rpath, -+ -+## Compiler switch to embed a library name -+LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET)) -+ -+## Shared object suffix -+SO = so -+## Non-shared intermediate object suffix -+STATIC_O = ao -+ -+## Compilation rules -+%.$(STATIC_O): $(srcdir)/%.c -+ $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< -+%.o: $(srcdir)/%.c -+ $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< -+ -+%.$(STATIC_O): $(srcdir)/%.cpp -+ $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< -+%.o: $(srcdir)/%.cpp -+ $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< -+ -+ -+## Dependency rules -+#%.d: $(srcdir)/%.c -+# @echo "generating dependency information for $<" -+# @$(SHELL) -ec '$(GEN_DEPS.c) $< \ -+# | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ -+# [ -s $@ ] || rm -f $@' -+ -+#%.d: $(srcdir)/%.cpp -+# @echo "generating dependency information for $<" -+# @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ -+# | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ -+# [ -s $@ ] || rm -f $@' -+# -+## Versioned libraries rules -+ -+%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) -+ $(RM) $@ && ln -s ${ $@; \ -+ [ -s $@ ] || rm -f $@' -+ -+%.d: $(srcdir)/%.cpp -+ @echo "generating dependency information for $<" -+ @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ -+ | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ -+ [ -s $@ ] || rm -f $@' -+ -+## Versioned libraries rules -+ -+%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) -+ $(RM) $@ && ln -s ${&5 - $as_echo "\"C compiler set to CCC ${CC}\" " >&6; } - case "${host}" in -- alpha*-*-*) U_HAVE_INTTYPES_H=0; -+ alpha*-*-* | sw_64*-*-*) U_HAVE_INTTYPES_H=0; - CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0" - esac - fi -diff --git a/source/configure.ac b/source/configure.ac -index 425fdc7..6acf133 100644 ---- a/source/configure.ac -+++ b/source/configure.ac -@@ -685,7 +685,7 @@ fi - if test "$CC" = ccc; then - AC_MSG_RESULT("C compiler set to CCC ${CC}" ) - case "${host}" in -- alpha*-*-*) U_HAVE_INTTYPES_H=0; -+ alpha*-*-* | sw_64*-*-*) U_HAVE_INTTYPES_H=0; - CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0" - esac - fi diff --git a/source/i18n/double-conversion-utils.h b/source/i18n/double-conversion-utils.h -index c937463..7dcdbf8 100644 +index 303668f..786b0f8 100644 --- a/source/i18n/double-conversion-utils.h +++ b/source/i18n/double-conversion-utils.h -@@ -122,7 +122,7 @@ int main(int argc, char** argv) { +@@ -154,7 +154,7 @@ int main(int argc, char** argv) { defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ @@ -310,5 +22,5 @@ index c937463..7dcdbf8 100644 defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \ defined(__riscv) || defined(__e2k__) || \ -- -2.33.0 +2.39.1 diff --git a/icu.spec b/icu.spec index 8579030..e0e353e 100644 --- a/icu.spec +++ b/icu.spec @@ -1,6 +1,6 @@ Name: icu Version: 72.1 -Release: 6 +Release: 7 Summary: International Components for Unicode License: MIT and UCD and Public Domain URL: http://site.icu-project.org/ @@ -13,12 +13,9 @@ Requires: lib%{name} = %{version}-%{release} Patch1: gennorm2-man.patch Patch2: icuinfo-man.patch Patch3: backport-remove-TestJitterbug6175.patch -%ifarch loongarch -Patch4: 0001-add-support-loongarch64.patch -%endif -%ifarch sw_64 -Patch5: icu-Add-sw64-architecture.patch -%endif + +Patch1000: icu-Add-sw64-architecture.patch + Patch9000: delete-taboo-words.patch %description @@ -133,6 +130,10 @@ LD_LIBRARY_PATH=lib:stubdata:tools/ctestfw:$LD_LIBRARY_PATH bin/uconv -l %changelog +* Sun Feb 04 2024 yangchenguang - 72.1-7 +- icu already supports loongarch64 architecture +- Remove loongarch64 patch and modify sw_64 support patch to use all arch + * Tue Jun 13 2023 zhangpan - 72.1-6 - delete taboo words @@ -151,7 +152,7 @@ LD_LIBRARY_PATH=lib:stubdata:tools/ctestfw:$LD_LIBRARY_PATH bin/uconv -l * Tue Nov 15 2022 zhouwenpei - 72.1-1 - update to icu4c-72.1 -* Sat Jun 25 2020 hanhui - 69.1-3 +* Thu Jun 25 2020 hanhui - 69.1-3 - fix build failed * Thu Jul 16 2020 hanhui - 69.1-2 -- Gitee