mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
feat: 增加安全编译选项
增加gcc/g++安全编译选项,提高编译阶段安全性 Log: 增加安全编译选项 Task: https://pms.uniontech.com/zentao/story-view-13331.html Influence: 编译安全性 Change-Id: I324b36ddc0214af27cba65b4687c841c696b0b13
This commit is contained in:
parent
5c7e5ffefc
commit
0181e8f10b
@ -13,6 +13,9 @@ set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_CXX_FLAGS "-g -Wall")
|
||||
|
||||
# 增加安全编译参数
|
||||
ADD_DEFINITIONS("-fstack-protector-strong -D_FORTITY_SOURCE=1 -z noexecstack -pie -fPIC -z lazy")
|
||||
|
||||
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "mips64")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -ftree-vectorize -march=loongson3a -mhard-float -mno-micromips -mno-mips16 -flax-vector-conversions -mloongson-ext2 -mloongson-mmi -fPIE")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
|
||||
|
Loading…
x
Reference in New Issue
Block a user