Ai
11 Star 1 Fork 36

src-openEuler/icu
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
icu-Add-sw64-architecture.patch 8.09 KB
一键复制 编辑 原始数据 按行查看 历史
Funda Wang 提交于 2025-01-31 23:12 +08:00 . 76.1
From a4fb55ae3de789cf645d4939ed8af9dbaad242ce Mon Sep 17 00:00:00 2001
From: wuzx <wuzx1226@qq.com>
Date: Fri, 18 Nov 2022 02:53:10 +0800
Subject: [PATCH] Add sw64 architecture
Signed-off-by: wuzx <wuzx1226@qq.com>
---
source/acinclude.m4 | 6 ++
source/config.guess | 8 +++
source/config.sub | 1 +
source/config/mh-sw_64-linux-cc | 87 +++++++++++++++++++++++++++
source/config/mh-sw_64-linux-gcc | 85 ++++++++++++++++++++++++++
source/i18n/double-conversion-utils.h | 2 +-
6 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
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
@@ -1010,6 +1010,14 @@
UNAME_MACHINE=aarch64_be
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
+ 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
+ GUESS=${UNAME_MACHINE}-sunway-linux-${LIBC}
+ ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` 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
@@ -1250,6 +1250,7 @@
| 580 \
| [cjt]90 \
| a29k \
+ | sw_64 \
| aarch64 \
| aarch64_be \
| aarch64c \
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 ${<F} $@
+%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
+ $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
+
+## Bind internal references
+
+# LDflags that pkgdata will use
+BIR_LDFLAGS= -Wl,-Bsymbolic
+
+# Dependencies [i.e. map files] for the final library
+BIR_DEPS=
+
+## End Linux-specific setup
+
diff --git a/source/config/mh-sw_64-linux-gcc b/source/config/mh-sw_64-linux-gcc
new file mode 100644
index 0000000..a3531d2
--- /dev/null
+++ b/source/config/mh-sw_64-linux-gcc
@@ -0,0 +1,85 @@
+## -*-makefile-*-
+## Copyright (C) 2016 and later: Unicode, Inc. and others.
+## License & terms of use: http://www.unicode.org/copyright.html
+## Linux-specific setup
+## Copyright (c) 1999-2009, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Commands to generate dependency files
+GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
+GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
+
+## 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 += -mieee
+CXXFLAGS += -mieee
+
+## 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 library options
+LD_SOOPTIONS= -Wl,-Bsymbolic
+
+## 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 ${<F} $@
+%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
+ $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
+
+# The type of assembly to write for generating an object file
+GENCCODE_ASSEMBLY=-a gcc
+
+## Bind internal references
+
+# LDflags that pkgdata will use
+BIR_LDFLAGS= -Wl,-Bsymbolic
+
+# Dependencies [i.e. map files] for the final library
+BIR_DEPS=
+
+## End Linux-specific setup
+
diff --git a/source/i18n/double-conversion-utils.h b/source/i18n/double-conversion-utils.h
index c937463..7dcdbf8 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) {
defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
- defined(__SH4__) || defined(__alpha__) || \
+ defined(__SH4__) || defined(__alpha__) || defined(__sw_64__) || \
defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) ||\
defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
defined(__riscv) || defined(__e2k__) || \
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/icu.git
git@gitee.com:src-openeuler/icu.git
src-openeuler
icu
icu
master

搜索帮助