diff options
-rw-r--r-- | dev-util/rr/files/rr-5.7.0-no-force-lto.patch | 23 | ||||
-rw-r--r-- | dev-util/rr/rr-5.7.0.ebuild | 4 |
2 files changed, 27 insertions, 0 deletions
diff --git a/dev-util/rr/files/rr-5.7.0-no-force-lto.patch b/dev-util/rr/files/rr-5.7.0-no-force-lto.patch new file mode 100644 index 000000000000..f9665f435f4c --- /dev/null +++ b/dev-util/rr/files/rr-5.7.0-no-force-lto.patch @@ -0,0 +1,23 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -118,7 +118,6 @@ if(LOWERCASE_CMAKE_BUILD_TYPE STREQUAL "debug") + set(RR_FLAGS "${RR_FLAGS_DEBUG} -g3 ") + elseif(LOWERCASE_CMAKE_BUILD_TYPE STREQUAL "release") + # CMake itself will add optimization flags +- set(RR_FLAGS "${RR_FLAGS_RELEASE} -g3 -flto") + endif() + + set(LINKER_FLAGS "") +@@ -675,12 +674,6 @@ endif() + + # Add -flto option to linking step if release + if(LOWERCASE_CMAKE_BUILD_TYPE STREQUAL "release") +- CHECK_C_COMPILER_FLAG("-flto=auto" SUPPORTS_LTO_AUTO) +- if(SUPPORTS_LTO_AUTO) +- set(RR_MAIN_LINKER_FLAGS "${RR_MAIN_LINKER_FLAGS} -flto=auto") +- else() +- set(RR_MAIN_LINKER_FLAGS "${RR_MAIN_LINKER_FLAGS} -flto") +- endif() + endif() + + if(LIBRT) diff --git a/dev-util/rr/rr-5.7.0.ebuild b/dev-util/rr/rr-5.7.0.ebuild index d8ae5a3fd5c7..ab0fca41cd19 100644 --- a/dev-util/rr/rr-5.7.0.ebuild +++ b/dev-util/rr/rr-5.7.0.ebuild @@ -43,6 +43,10 @@ QA_FLAGS_IGNORED=" RESTRICT="test" # toolchain and kernel version dependent +PATCHES=( + "${FILESDIR}"/${PN}-5.7.0-no-force-lto.patch +) + pkg_setup() { if use kernel_linux; then CONFIG_CHECK="SECCOMP" |