From bf5164c2b61946a338a8efe215f83e843241c1fec3bf87116b29cbbdaa69a961 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 25 Mar 2020 12:38:21 +0000 Subject: [PATCH] Accepting request 788175 from home:marxin:branches:devel:tools - Add parallel-lto.patch in order to make LTO LTRANS phase parallel. It will significantly improve build time. OBS-URL: https://build.opensuse.org/request/show/788175 OBS-URL: https://build.opensuse.org/package/show/devel:tools/valgrind?expand=0&rev=217 --- parallel-lto.patch | 26 ++++++++++++++++++++++++++ valgrind.changes | 6 ++++++ valgrind.spec | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 parallel-lto.patch diff --git a/parallel-lto.patch b/parallel-lto.patch new file mode 100644 index 0000000..db3f63c --- /dev/null +++ b/parallel-lto.patch @@ -0,0 +1,26 @@ +diff --git a/configure b/configure +index 1c9ad2f..4fc8478 100755 +--- a/configure ++++ b/configure +@@ -9310,7 +9310,7 @@ if test "x${vg_cv_lto}" != "xno" -a "x${LTO_AR}" != "x" -a "x${LTO_RANLIB}" != " + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if toolchain accepts lto" >&5 + $as_echo_n "checking if toolchain accepts lto... " >&6; } + safe_CFLAGS=$CFLAGS +-TEST_LTO_CFLAGS="-flto -flto-partition=one -fuse-linker-plugin" ++TEST_LTO_CFLAGS="-flto=auto" + # Note : using 'one' partition is giving a slightly smaller/faster memcheck + # and ld/lto-trans1 still needs a reasonable memory (about 0.5GB) when linking. + CFLAGS="$TEST_LTO_CFLAGS -Werror" +diff --git a/configure.ac b/configure.ac +index f8c798b..4a76150 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -2025,7 +2025,7 @@ AC_CACHE_CHECK([for using the link time optimisation], vg_cv_lto, + if test "x${vg_cv_lto}" != "xno" -a "x${LTO_AR}" != "x" -a "x${LTO_RANLIB}" != "x"; then + AC_MSG_CHECKING([if toolchain accepts lto]) + safe_CFLAGS=$CFLAGS +-TEST_LTO_CFLAGS="-flto -flto-partition=one -fuse-linker-plugin" ++TEST_LTO_CFLAGS="-flto=auto" + # Note : using 'one' partition is giving a slightly smaller/faster memcheck + # and ld/lto-trans1 still needs a reasonable memory (about 0.5GB) when linking. + CFLAGS="$TEST_LTO_CFLAGS -Werror" diff --git a/valgrind.changes b/valgrind.changes index 6905fd0..45b581d 100644 --- a/valgrind.changes +++ b/valgrind.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 25 12:15:59 UTC 2020 - Martin Liška + +- Add parallel-lto.patch in order to make LTO LTRANS phase + parallel. It will significantly improve build time. + ------------------------------------------------------------------- Thu Mar 12 08:56:24 UTC 2020 - Dirk Mueller diff --git a/valgrind.spec b/valgrind.spec index 4085f86..45aae6c 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -48,6 +48,7 @@ Patch5: 0001-Fix-makefile-consistency-check.patch Patch6: 0001-s390x-Add-models-z14-and-z14-ZR1.patch Patch7: 0001-s390x-Clean-up-s390-check-opcodes.pl.patch Patch8: 0001-s390x-Add-CPU-model-for-z15.patch +Patch9: parallel-lto.patch %if "%{flavor}" == "" %if %{with docs} BuildRequires: docbook-xsl-stylesheets @@ -164,6 +165,7 @@ but it has been successfully used to optimize several KDE applications. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %build %if "%{flavor}" == ""