From 2b1349b256b30f12fb31485e3e4120e6ef49ff56 Mon Sep 17 00:00:00 2001 From: surtur Date: Thu, 27 Jan 2022 20:32:57 +0100 Subject: [PATCH] cmake: add -fno-signed-zeros, -ffunction-sections --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b500869..e0fae22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,6 +209,7 @@ endif(NOT CMAKE_CXX_FLAGS MATCHES "-fPIC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcf-protection") add_compile_options (-fdiagnostics-show-location=once) +add_compile_options(-fno-signed-zeros -ffunction-sections) if(CMAKE_BUILD_TYPE STREQUAL Debug) set(LDFLAGS "${LDFLAGS} -Wl,-Og,–sort-common,–as-needed,-z,now,-pic,-pie")