summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-03-15 02:26:35 +0000
committerSam James <sam@gentoo.org>2024-03-15 02:26:49 +0000
commitafc02357cda0226f1ad0b9b1b3460a43166eeb85 (patch)
tree41bc8238bf0aa0890321e1704b69e2d047566051 /dev-util/rr
parentdev-util/autoproject: add 0.20_p15 (diff)
downloadgentoo-afc02357cda0226f1ad0b9b1b3460a43166eeb85.tar.gz
gentoo-afc02357cda0226f1ad0b9b1b3460a43166eeb85.tar.bz2
gentoo-afc02357cda0226f1ad0b9b1b3460a43166eeb85.zip
dev-util/rr: don't force LTO
We leave it up to users to set. (That said, this did help find a GCC bug: https://gcc.gnu.org/PR14232). Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/rr')
-rw-r--r--dev-util/rr/files/rr-5.7.0-no-force-lto.patch23
-rw-r--r--dev-util/rr/rr-5.7.0.ebuild4
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"