From f3489efe8207558f6e1c287d8d802a3b2ac06ffa Mon Sep 17 00:00:00 2001 From: dengzhongyuan Date: Thu, 19 Jun 2025 17:46:24 +0800 Subject: [PATCH] chore: Update security compilation flags in tests.pro - Added -fPIC to QMAKE_CFLAGS for position-independent code. - Ensured consistent security flags across QMAKE_CFLAGS and QMAKE_CXXFLAGS. Log: Enhance security compilation settings for better protection. --- src/tests/tests.pro | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tests/tests.pro b/src/tests/tests.pro index 26ed38c3..a27725bc 100644 --- a/src/tests/tests.pro +++ b/src/tests/tests.pro @@ -8,9 +8,9 @@ CONFIG(debug, debug|release) { } #添加安全编译参数 -QMAKE_LFLAGS += -z noexecstack -pie -fPIC -z relro -z now -QMAKE_CFLAGS += -fstack-protector-all -QMAKE_CXXFLAGS += -fstack-protector-all -fno-access-control +QMAKE_LFLAGS += -z noexecstack -pie -z relro -z now +QMAKE_CFLAGS += -fstack-protector-all -fPIC +QMAKE_CXXFLAGS += -fstack-protector-all -fno-access-control -fPIC QT += core gui widgets testlib