Skip to content

Commit 112a1a2

Browse files
wangrong1069deepin-bot[bot]
authored andcommitted
chore: Update compiler flags for security enhancements
Replace "-D_FORTITY_SOURCE=1" with "-D_FORTIFY_SOURCE=2". Log: Update compiler flags for security enhancements Bug: https://pms.uniontech.com/bug-view-337059.html
1 parent 37aae99 commit 112a1a2

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src-old/src/dcc-fcitx5configtool/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set(CMAKE_AUTORCC ON)
1111
set(CMAKE_CXX_FLAGS "-g -Wall")
1212

1313
# 增加安全编译参数
14-
ADD_DEFINITIONS("-fstack-protector-strong -D_FORTITY_SOURCE=1 -z noexecstack -pie -fPIC -z lazy")
14+
ADD_DEFINITIONS("-fstack-protector-strong -D_FORTIFY_SOURCE=2 -z noexecstack -pie -fPIC -z lazy")
1515

1616
# 指定要用到的库
1717
# -DQT_MAJOR_VERSION=6

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set(CMAKE_AUTORCC ON)
77
set(CMAKE_CXX_FLAGS "-g -Wall")
88

99
# 增加安全编译参数
10-
ADD_DEFINITIONS("-fstack-protector-strong -D_FORTITY_SOURCE=1 -z noexecstack -pie -fPIC -z lazy")
10+
ADD_DEFINITIONS("-fstack-protector-strong -D_FORTIFY_SOURCE=2 -z noexecstack -pie -fPIC -z lazy")
1111

1212
find_package(Qt${QT_DESIRED_VERSION} COMPONENTS Core Gui DBus LinguistTools REQUIRED)
1313
find_package(Dtk${DTK_VERSION_MAJOR} COMPONENTS Core Widget REQUIRED)

src/dcc-fcitx5configtool-exec/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set(CMAKE_AUTORCC ON)
1111
set(CMAKE_CXX_FLAGS "-g -Wall")
1212

1313
# 增加安全编译参数
14-
ADD_DEFINITIONS("-fstack-protector-strong -D_FORTITY_SOURCE=1 -z noexecstack -pie -fPIC -z lazy")
14+
ADD_DEFINITIONS("-fstack-protector-strong -D_FORTIFY_SOURCE=2 -z noexecstack -pie -fPIC -z lazy")
1515

1616
# 指定要用到的库
1717
find_package(Qt${QT_DESIRED_VERSION} COMPONENTS Core Gui Widgets REQUIRED)

src/dcc-fcitx5configtool/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set(CMAKE_AUTORCC ON)
1111
set(CMAKE_CXX_FLAGS "-g -Wall")
1212

1313
# 增加安全编译参数
14-
ADD_DEFINITIONS("-fstack-protector-strong -D_FORTITY_SOURCE=1 -z noexecstack -pie -fPIC -z lazy")
14+
ADD_DEFINITIONS("-fstack-protector-strong -D_FORTIFY_SOURCE=2 -z noexecstack -pie -fPIC -z lazy")
1515

1616
find_package(Qt${QT_DESIRED_VERSION} COMPONENTS Core Gui DBus LinguistTools Qml REQUIRED)
1717
find_package(DdeControlCenter REQUIRED)

0 commit comments

Comments
 (0)