From: Sam James Date: Mon, 22 Jul 2024 11:26:39 +0000 (+0100) Subject: configure: drop -flto-partition=one X-Git-Tag: VALGRIND_3_24_0~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41a9896f9a91c0e1e44edf3aeff90b6f42f5c132;p=thirdparty%2Fvalgrind.git configure: drop -flto-partition=one For me, -flto-partition=one takes ~35m to build + test, while the default (which is 'balanced') takes ~5m. The reason that -flto-partition=one is slower is because it disables all of gcc's LTO parallelisation. This can produce better code, at the cost of (far) more expensive build times. If users want that, they can still pass it in their *FLAGS, but I don't think it's a suitable default. This was originally added in ab773096df7aaaf46e8883af5ed4690f4d4499af. https://bugs.kde.org/show_bug.cgi?id=490651 --- diff --git a/NEWS b/NEWS index 33284c60c..b6bdd1613 100644 --- a/NEWS +++ b/NEWS @@ -56,6 +56,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 489088 Valgrind throws unhandled instruction bytes: 0xC5 0x79 0xD6 0xE0 0xC5 489338 arm64: Instruction fcvtas should round 322.5 to 323, but result is 322. 489676 vgdb handle EINTR and EAGAIN more consistently +490651 Stop using -flto-partition=one To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/configure.ac b/configure.ac index 3dfd3345f..911bccaa8 100755 --- a/configure.ac +++ b/configure.ac @@ -2556,9 +2556,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" -# 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. +TEST_LTO_CFLAGS="-flto -fuse-linker-plugin" CFLAGS="$TEST_LTO_CFLAGS -Werror" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[