Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wl,--as-needed -fPIE")
#set(QT_MINIMUM_VERSION "6.0.0")
set(CMAKE_EXE_LINKER_FLAGS "-pie")

if(CMAKE_BUILD_TYPE STREQUAL "Release")
message("Enable build hardening.")

set(CMAKE_VERBOSE_MAKEFILE ON)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=${CMAKE_SOURCE_DIR}=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=${CMAKE_SOURCE_DIR}=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now")
endif()

# 查找Qt库
find_package(Qt6 QUIET)

Expand Down
2 changes: 1 addition & 1 deletion arm64/linglong.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: '1'
package:
id: org.deepin.draw
name: deepin-draw
version: 6.5.34.1
version: 6.5.35.1
kind: app
description: |
Draw for deepin os.
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
deepin-draw (6.5.35) unstable; urgency=medium

* chore: Update compiler flags for security enhancements

-- wangrong <wangrong@uniontech.com> Wed, 28 Jan 2026 10:53:25 +0800

deepin-draw (6.5.34) unstable; urgency=medium

* chore: Update version to 6.5.34
Expand Down
2 changes: 1 addition & 1 deletion linglong.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: '1'
package:
id: org.deepin.draw
name: deepin-draw
version: 6.5.34.1
version: 6.5.35.1
kind: app
description: |
Draw for deepin os.
Expand Down
2 changes: 1 addition & 1 deletion loong64/linglong.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: '1'
package:
id: org.deepin.draw
name: deepin-draw
version: 6.5.34.1
version: 6.5.35.1
kind: app
description: |
Draw for deepin os.
Expand Down
3 changes: 3 additions & 0 deletions src/deepin-draw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ target_include_directories(${PROJECT_NAME} PUBLIC ${3RMODULES_INCLUDE_DIRS})

target_link_libraries(${PROJECT_NAME} ${3RMODULES_LIBRARIES} ${CMAKE_DL_LIBS} ${BASE_LIB})

# 启用只读重定位/立即绑定,以提高安全性
target_link_options(${PROJECT_NAME} PRIVATE -Wl,-z,relro -Wl,-z,now)

install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}Targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down
2 changes: 1 addition & 1 deletion sw64/linglong.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: '1'
package:
id: org.deepin.draw
name: deepin-draw
version: 6.5.34.1
version: 6.5.35.1
kind: app
description: |
Draw for deepin os.
Expand Down
Loading