Index: valgrind-3.23.0/configure =================================================================== --- valgrind-3.23.0.orig/configure +++ valgrind-3.23.0/configure @@ -11265,7 +11265,7 @@ if test "x${vg_cv_lto}" != "xno" -a "x${ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if toolchain accepts lto" >&5 printf %s "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" Index: valgrind-3.23.0/configure.ac =================================================================== --- valgrind-3.23.0.orig/configure.ac +++ valgrind-3.23.0/configure.ac @@ -2541,7 +2541,7 @@ AC_CACHE_CHECK([for using the link time 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"