Skip to content

Commit 6ac25b2

Browse files
committed
fix: add security hardening flags and optimize build settings
add security hardening flags and optimize build settings Log: pms: BUG-321339
1 parent 93fcceb commit 6ac25b2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ BINARIES = \
113113

114114
LANGUAGES = $(basename $(notdir $(wildcard misc/po/*.po)))
115115

116-
CFLAGS = -W -Wall -fPIC -fstack-protector-all -z relro -z noexecstack -z now -pie
117-
118116
all: build
119117

120118
prepare:

debian/rules

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ include /usr/share/dpkg/architecture.mk
55
export GOCACHE = /tmp/gocache
66
export GOPATH = /usr/share/gocode
77
export GO111MODULE=off
8+
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
9+
export CFLAGS = -W -Wall -fPIC -fstack-protector-all -z relro -z noexecstack -z now -pie
810

911
SYSTYPE=Desktop
1012
SYSTYPE=$(shell cat /etc/deepin-version | grep Type= | awk -F'=' '{print $$2}')

0 commit comments

Comments
 (0)