Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
1c518e5ca8
!7 Enable debuginfo for riscv64
From: @misaka00251 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2024-03-05 11:11:33 +00:00
misaka00251
f4d087b6ab Enable debuginfo for riscv64 2023-12-22 16:52:55 +08:00
openeuler-ci-bot
b2a1e60f85
!6 [sync] PR-5: exclude no need .pyc files
From: @openeuler-sync-bot 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2023-08-19 03:38:03 +00:00
small_leek
28013e0221 exclude no need .pyc files
Signed-off-by: small_leek <xiasenlin1@huawei.com>
(cherry picked from commit da47c8eab0bc93ddae283372831ccc79b2af18de)
2023-08-19 10:50:27 +08:00
small_leek
994b4493f8 exclude no need .pyc files
Signed-off-by: small_leek <xiasenlin1@huawei.com>
(cherry picked from commit 3f37a0f487a7bc031ce9d3d7cc7ef0969889ba7c)
2023-08-19 10:50:27 +08:00
small_leek
53fc43eed7 exclude no need .pyc files
Signed-off-by: small_leek <xiasenlin1@huawei.com>
(cherry picked from commit 721ec9e8da533f4ac43e4584e6a7173aa3a2dbc5)
2023-08-19 10:50:27 +08:00
openeuler-ci-bot
2ebba98461
!4 Add risc-v and loongarch support
From: @misaka00251 
Reviewed-by: @liheavy 
Signed-off-by: @liheavy
2023-03-16 12:09:48 +00:00
misaka00251
a1241b4eda
Add risc-v and loongarch support 2023-03-13 11:13:13 +08:00
openeuler-ci-bot
4d99818154
!3 添加安全编译选项fPIE
From: @xu-chongyu214 
Reviewed-by: @liheavy 
Signed-off-by: @liheavy
2023-03-07 07:30:44 +00:00
xuchongyu
7e15185a31 Add safe compilation option -fPIE for GN 2023-03-07 15:05:40 +08:00
3 changed files with 63 additions and 3 deletions

View 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

View File

@ -0,0 +1,18 @@
From: "xuchogyu" <xuchongyu@huawei.com>
Date: Tue, 7 Mar 2023 09:52:37 +0800
Subject: [PATCH] Add safe compilation option -fPIE for GN
---
diff -Nur a/build/gen.py b/build/gen.py
--- a/build/gen.py 2022-11-25 10:58:41.000000000 +0800
+++ b/build/gen.py 2023-03-06 09:49:35.648580670 +0800
@@ -371,7 +371,8 @@
'-Wall',
'-Wextra',
'-Wno-unused-parameter',
- '-std=c++17'
+ '-std=c++17',
+ '-fPIE'
])
if platform.is_linux() or platform.is_mingw() or platform.is_msys():

22
gn.spec
View File

@ -2,13 +2,15 @@
Name: gn
Version: 1.0.0
Release: 1
Release: 5
Summary: Meta-build system that generates build files for Ninja
License: BSD-3-Clause
URL: https://gn.googlesource.com/gn
Source0: %{url}/+archive/gn-%{commit}.tar.gz
Source1: last_commit_position.h
Patch0: gn-always-python3.patch
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
@ -71,10 +73,10 @@ find '%{buildroot}%{_datadir}/vim/vimfiles' \
install -t '%{buildroot}%{_emacs_sitestartdir}' -D -p -m 0644 misc/emacs/*.el
install -t '%{buildroot}%{_mandir}/man1' -D -m 0644 -p out/gn.1
rm -rf %{buildroot}%{_datadir}/vim/vimfiles/__pycache__
%check
out/gn_unittests
rm -rf %{buildroot}%{_datadir}/vim/vimfiles/__pycache__
%files
@ -87,6 +89,8 @@ out/gn_unittests
%{_datadir}/vim/vimfiles/ftplugin/gn.vim
%{_datadir}/vim/vimfiles/syntax/gn.vim
%{_emacs_sitestartdir}/gn-mode.el
%exclude %{_datadir}/vim/vimfiles/__pycache__
%files doc
%license LICENSE src/base/third_party/icu/README.chromium
@ -100,5 +104,17 @@ out/gn_unittests
%changelog
* Fri Dec 22 2023 misaka00251 <liuxin@iscas.ac.cn> - 1.0.0-5
- Enable debuginfo for riscv64
* Sat Aug 19 2023 senlin <xiasenlin1@huawei.com> - 1.0.0-4
- exclude no need .pyc files
* 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
* Tue Nov 29 2022 xuchongyu <xuchongyu@huawei.com> 1.0.0-1
- init