This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Final intermodule patch


On Mon, 2003-07-14 at 18:36, Alexandre Oliva wrote:
> On Jul 13, 2003, Mark Mitchell <mark@codesourcery.com> wrote:
> 
> > I suspect that multiple .s file output would also be better [...]
> 
> But how would you merge them back into a single output object file?
> ld -r?  This would probably defeat any speedup you might get from
> multiple-translation-units-at-once compilation.

Not entirely.  You only need to exec one cc1 process, and if you are
clever enough you may even be able to reuse header file trees.  There
are not very many programs where (a) building takes a long time, and (b)
"ld -r" is the dominant part of the build cycle.  The slowness in GCC is
coming from the time it takes to generate the .s files.

You could also modify GNU as to take multiple .s files and smush them
into one .o file, by doing whatever it is that "ld -r" does internally. 
(I don't know what "ld -r" does when there are two static symbols named
"foo".  Perhaps it renames them apart just like GCC, or perhaps they can
coexist.)

> Or would we rule out gcc -c foo.c bar.c -o foobar.o, and maybe accept
> say gcc -c foo.c -o foo.o -c bar.c -o bar.o?

That would be my preference.  I'm not sure about the exact syntax, but
what I am suggesting is that you get multiple .o files out when you put
multiple .c files in.

-- 
Mark Mitchell <mark@codesourcery.com>
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]