Commit 86415bc
committed
refactor: update build flags and security hardening
1. Removed -Wall from CMakeLists.txt since it's now handled in debian/
rules
2. Added comprehensive security hardening flags in debian/rules
including:
- Stack protection (-fstack-protector-all)
- Relocation hardening (-Wl,-z,relro)
- Immediate binding (-Wl,-z,now)
- No executable stack (-Wl,-z,noexecstack)
3. Kept -Wextra warnings in CMake for additional checks
4. Moved linker flag --as-needed to debian/rules for consistency
The changes improve security hardening while maintaining warning levels
and cleaning up flag organization between build systems.
refactor: 更新构建标志和安全加固
1. 从 CMakeLists.txt 中移除 -Wall,因为它现在在 debian/rules 中处理
2. 在 debian/rules 中添加全面的安全加固标志,包括:
- 栈保护 (-fstack-protector-all)
- 重定位加固 (-Wl,-z,relro)
- 立即绑定 (-Wl,-z,now)
- 不可执行栈 (-Wl,-z,noexecstack)
3. 在 CMake 中保留 -Wextra 警告用于额外检查
4. 将链接器标志 --as-needed 移至 debian/rules 以保持一致性
这些更改在保持警告级别和清理构建系统间标志组织的同时,提高了安全加固
水平。1 parent 345564f commit 86415bc
File tree
5 files changed
+25
-2
lines changed- debian
- qt6/src
- qml
- private
- settings
5 files changed
+25
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
39 | 45 | | |
0 commit comments