From 0568c6109889981cbef46d7f6d30d5b07b6c97cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E4=B9=89?= <977713017@qq.com> Date: Thu, 10 Aug 2023 10:11:04 +0000 Subject: [PATCH] Fix error unused compilation options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 任义 <977713017@qq.com> --- 0005-fix-error-unuse-Wl.patch | 14 ++++++++++++++ oncn-bwm.spec | 11 ++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 0005-fix-error-unuse-Wl.patch diff --git a/0005-fix-error-unuse-Wl.patch b/0005-fix-error-unuse-Wl.patch new file mode 100644 index 0000000..dc8607b --- /dev/null +++ b/0005-fix-error-unuse-Wl.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 70b47e7..d6560c1 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,7 @@ + cmake_minimum_required(VERSION 3.12.1) + project(bwmcli LANGUAGES C ) +-set(CMAKE_C_FLAGS "-g -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Werror -ftrapv -O2 -Wl,-z,noexecstack \ +- -Wl,-z,relro -fPIE -pie -Wl,-z,now") ++set(CMAKE_C_FLAGS "-g -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Werror -ftrapv -O2") ++set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-z,noexecstack -Wl,-z,relro -fPIE -pie -Wl,-z,now") + + include_directories("${PROJECT_SOURCE_DIR}/") + include_directories("${PROJECT_SOURCE_DIR}/bpf") \ No newline at end of file diff --git a/oncn-bwm.spec b/oncn-bwm.spec index 5db692b..bdf162c 100644 --- a/oncn-bwm.spec +++ b/oncn-bwm.spec @@ -1,6 +1,6 @@ Name: oncn-bwm Version: 1.1 -Release: 4 +Release: 5 Summary: Pod bandwidth management in mixed deployment scenarios of online and offline services License: GPL-2.0 URL: https://gitee.com/src-openeuler/oncn-bwm @@ -18,6 +18,12 @@ Patch9001: 0001-adapt-libbpf-0.8.1.patch Patch9002: 0002-clean-code-and-use-securec-function.patch Patch9003: 0003-add-proc-file-interface.patch Patch9004: 0004-fix-offline-packets-block.patch +Patch9005: 0005-fix-error-unuse-Wl.patch + +%if "%toolchain" == "clang" +%define debug_package %{nil} +%define __strip /bin/true +%endif %description Pod bandwidth management in mixed deployment scenarios of online and offline services @@ -112,6 +118,9 @@ depmod -a %changelog +* Thu Aug 10 2023 renyi <977713017@qq.com> - 1.1-5 +- fix error unuse option + * Sat May 20 2023 JofDiamonds - 1.1-4 - fix offline packets block -- Gitee