public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, driver specs] Put -flto-partition= on the collect2 c/l
@ 2018-08-18 19:00 Iain Sandoe
  2018-08-20 10:02 ` Richard Biener
  0 siblings, 1 reply; 10+ messages in thread
From: Iain Sandoe @ 2018-08-18 19:00 UTC (permalink / raw)
  To: GCC Patches, Richard Biener

Hi 

While working on the Darwin LTO issues I noticed that collect2 looks for "-flto-partition=none” in its command line option, but it doesn’t get passed.

So - is the attached patch the right idea, or should collect2 be looking in the COLLECT_GCC_OPTIONS as the lto-wrapper does?

(or maybe it should just be just "%{fno-lto} %{flto*}" ?)

I plan on making Darwin default to fno-lto for link unless there’s an “flto*” on the link line, since otherwise there’s a process launch for every object on the c/l to do “nm”, which is quite heavy weight.  At present, ISTM if the compiler is configured with —enable-lto, the link line defaults to assuming that every object needs to be checked.

Iain.

 diff --git a/gcc/gcc.c b/gcc/gcc.c
index 780d485..bc9772b 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -1038,7 +1038,7 @@ proper position among the other output files.  */
     %(linker) " \
     LINK_PLUGIN_SPEC \
    "%{flto|flto=*:%<fcompare-debug*} \
-    %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
+    %{flto} %{flto-*} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
    "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
    "%X %{o*} %{e*} %{N} %{n} %{r}\
     %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-12-07 11:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-18 19:00 [PATCH, driver specs] Put -flto-partition= on the collect2 c/l Iain Sandoe
2018-08-20 10:02 ` Richard Biener
2018-08-22 12:51   ` [PATCH, driver specs][1] " Iain Sandoe
2018-08-22 13:17     ` Richard Biener
2018-08-22 12:56   ` [PATCH, driver specs][2] " Iain Sandoe
2018-08-22 13:20     ` Richard Biener
2018-12-07  0:25       ` Iain Sandoe
2018-12-07 11:32         ` Richard Biener
2018-08-22 13:06   ` [PATCH, driver specs][3] " Iain Sandoe
2018-08-22 13:23     ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).