diff --git a/0005-fix-error-unuse-Wl.patch b/0005-fix-error-unuse-Wl.patch new file mode 100644 index 0000000000000000000000000000000000000000..dc8607b087b8d76331aa746cd97f2bc422f132f9 --- /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 5db692b57dd565aae4cedea3d62c2da53c3a5211..817d00ca0a7801f34dd4352f2ce03f11b1e1cb61 100644 --- a/oncn-bwm.spec +++ b/oncn-bwm.spec @@ -19,6 +19,11 @@ Patch9002: 0002-clean-code-and-use-securec-function.patch Patch9003: 0003-add-proc-file-interface.patch Patch9004: 0004-fix-offline-packets-block.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