Add risc-v and loongarch support
This commit is contained in:
parent
4d99818154
commit
a1241b4eda
26
add-risc-v-and-loongarch-support.patch
Normal file
26
add-risc-v-and-loongarch-support.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/src/util/build_config.h b/src/util/build_config.h
|
||||
index 717b4e3..438777e 100644
|
||||
--- a/src/util/build_config.h
|
||||
+++ b/src/util/build_config.h
|
||||
@@ -164,6 +164,21 @@
|
||||
#define ARCH_CPU_32_BITS 1
|
||||
#define ARCH_CPU_BIG_ENDIAN 1
|
||||
#endif
|
||||
+#elif defined(__loongarch32)
|
||||
+#define ARCH_CPU_LOONG_FAMILY 1
|
||||
+#define ARCH_CPU_LOONG32 1
|
||||
+#define ARCH_CPU_32_BITS 1
|
||||
+#define ARCH_CPU_LITTLE_ENDIAN 1
|
||||
+#elif defined(__loongarch64)
|
||||
+#define ARCH_CPU_LOONG_FAMILY 1
|
||||
+#define ARCH_CPU_LOONG64 1
|
||||
+#define ARCH_CPU_64_BITS 1
|
||||
+#define ARCH_CPU_LITTLE_ENDIAN 1
|
||||
+#elif defined(__riscv) && (__riscv_xlen == 64)
|
||||
+#define ARCH_CPU_RISCV_FAMILY 1
|
||||
+#define ARCH_CPU_RISCV64 1
|
||||
+#define ARCH_CPU_64_BITS 1
|
||||
+#define ARCH_CPU_LITTLE_ENDIAN 1
|
||||
#else
|
||||
#error Please add support for your architecture in build_config.h
|
||||
#endif
|
||||
9
gn.spec
9
gn.spec
@ -1,8 +1,11 @@
|
||||
%ifarch riscv64
|
||||
%global _debugsource_template %{nil}
|
||||
%endif
|
||||
%global commit e1ac69b17da0c6d4f5e34e686690ff70c6a43e6f
|
||||
|
||||
Name: gn
|
||||
Version: 1.0.0
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: Meta-build system that generates build files for Ninja
|
||||
License: BSD-3-Clause
|
||||
URL: https://gn.googlesource.com/gn
|
||||
@ -10,6 +13,7 @@ Source0: %{url}/+archive/gn-%{commit}.tar.gz
|
||||
Source1: last_commit_position.h
|
||||
Patch0000: gn-always-python3.patch
|
||||
Patch0001: add_safe_compilation_options.patch
|
||||
Patch1000: add-risc-v-and-loongarch-support.patch
|
||||
|
||||
BuildRequires: python3-devel ninja-build gcc-c++ clang emacs-common help2man
|
||||
|
||||
@ -102,6 +106,9 @@ rm -rf %{buildroot}%{_datadir}/vim/vimfiles/__pycache__
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Mar 13 2023 misaka00251 <liuxin@iscas.ac.cn> - 1.0.0-3
|
||||
- Add risc-v and loongarch support
|
||||
|
||||
* Tue Mar 07 2023 xuchongyu <xuchongyu@huawei.com> 1.0.0-2
|
||||
- Add safe compilation options
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user