From 6d8685e861462dfea76382be0ad4a512915ce528 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 17 May 2022 16:03:17 +0100 Subject: Re-enable distribution of LTO compiles --- sys-devel/distcc/distcc-3.4-lto.patch | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sys-devel/distcc/distcc-3.4-lto.patch (limited to 'sys-devel') diff --git a/sys-devel/distcc/distcc-3.4-lto.patch b/sys-devel/distcc/distcc-3.4-lto.patch new file mode 100644 index 0000000..409454f --- /dev/null +++ b/sys-devel/distcc/distcc-3.4-lto.patch @@ -0,0 +1,33 @@ +From 47a19b96561f42dc216a30fdb4b9e21b89d04278 Mon Sep 17 00:00:00 2001 +From: Alexey Sheplyakov +Date: Mon, 12 Jul 2021 16:38:06 +0400 +Subject: [PATCH] Revert "Skip distributing LTO cc invocations" + +This reverts commit 8dacd28d888210753e9457eb31175d8e2a1c348e. +The "LTO invocations are not worth distributing" statement is in +general wrong. GCC generates the (target) machine code for every +compilation unit even with `-flto` (so it makes sense to distribute +these). And the whole program analysis is not guaranteed to be +the bottleneck of the build. As a matter of fact distributing +LTO compilations reduces the build time of LLVM/clang, GCC, and +other programs (especially C++ ones). + +Closes: #428 +--- + src/arg.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/arg.c b/src/arg.c +index 73ff707f..6ca5130e 100644 +--- a/src/arg.c ++++ b/src/arg.c +@@ -189,9 +189,6 @@ int dcc_scan_args(char *argv[], char **input_file, char **output_file, + rs_trace("-mtune=native optimizes for local machine; " + "must be local"); + return EXIT_DISTCC_FAILED; +- } else if (!strcmp(a, "-flto")) { +- rs_trace("LTO cc invocations are not worth distributing"); +- return EXIT_DISTCC_FAILED; + } else if (str_startswith("-Wa,", a)) { + /* Look for assembler options that would produce output + * files and must be local. -- cgit v1.2.3