On Wed, Oct 16, 2019 at 7:46 PM Giuliano Belinassi <giuliano.belina...@usp.br> wrote: > > Hi, > > Previously, the lto-wrapper communicates with ld by creating a pipe from > lto-wrapper's stdout to ld's stdin. This patch uses a temporary file for > this communication, releasing stdout to be used for debugging.
I'm not sure it is a good idea on its own. Then you have to consider that the lto-plugin is used to drive different GCC versions (and thus lto-wrappers) and you are breaking compatibility with older versions which makes it really not an option. There's stderr for debugging... > I've run a full testsuite and bootstrapped LTO in a linux x86_64, and found > no issues so far. Do I need to write a testcase for this feature? > > Giuliano. > > gcc/ChangeLog > 2019-10-16 Giuliano Belinassi <giuliano.belina...@usp.br> > > * lto-wrapper.c (STATIC_LEN): New macro. > (to_ld): New. > (find_crtofftable): Print to file to_ld. > (find_ld_list_file): New. > (main): Check if to_ld is valid or is stdout. > > gcc/libiberty > 2019-10-16 Giuliano Belinassi <giuliano.belina...@usp.br> > > * pex-unix.c (pex_unix_exec_child): check for PEX_KEEP_STD_IO flag. > (to_ld): New. > > gcc/include > 19-10-16 Giuliano Belinassi <giuliano.belina...@usp.br> > > * libiberty.h (PEX_KEEP_STD_IO): New macro. > > gcc/lto-plugin > 2019-10-16 Giuliano Belinassi <giuliano.belina...@usp.br> > > * lto-plugin.c (exec_lto_wrapper): Replace pipe from stdout to temporary > file, and pass its name in argv. >