https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78529
--- Comment #33 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 22 Mar 2017, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78529 > > --- Comment #32 from Jakub Jelinek <jakub at gcc dot gnu.org> --- > It is actually the *-lib.c files that should be -fno-lto. > But it seems all the source files are compiled/linked using one driver > invocation, so I have no idea how to do -fno-lto just for one file. Somehow change builtins.exp from foreach src [lsort [find $srcdir/$subdir *.c]] { if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} { c-torture-execute [list $src \ [file root $src]-lib.c \ $srcdir/$subdir/lib/main.c] \ $additional_flags to first compile [file root $src]-lib.c to [file root $src]-lib.o and then do c-torture-execute [list $src \ [file root $src]-lib.o \ $srcdir/$subdir/lib/main.c] \ $additional_flags ? Using gcc_target_compile in some way, like gcc_target_compile [file root $src]-lib.c [file root $src]-lib.o