Skip to content

Commit 5eb79bc

Browse files
wjyrichdeepin-bot[bot]
authored andcommitted
fix: fix safe build with debian/rules.
as title. Logs:
1 parent 9f3b624 commit 5eb79bc

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ project(dde-network-core
88
LANGUAGES CXX C
99
)
1010

11-
# 增加安全编译参数
12-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-all")
13-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-all")
14-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z relro -z now -z noexecstack -pie")
15-
1611
option(ENABLE_DEEPIN_NMQT "enable nmqt patch on deepin" OFF)
1712

1813
set(DDE-Network-Core_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/src-old")

debian/rules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
include /usr/share/dpkg/default.mk
33

44
export QT_SELECT = qt5
5+
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
6+
export DEB_CFLAGS_MAINT_APPEND = -Wall
7+
export DEB_CXXFLAGS_MAINT_APPEND = -Wall
8+
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-E
59

610
DISTRO = $(shell lsb_release -is)
711
ifeq ($(DISTRO),Deepin)

0 commit comments

Comments
 (0)