This is the mail archive of the gcc@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]

Re: documentation for cross compiling.


On Jul 27, 2001, tm <tm@kloo.net> wrote:

> Alexandre Oliva wrote:
>> 
>> On Jul  3, 2001, Toshi Morita <tm2@best.com> wrote:
>> 
>> > Can we make crt1.asm call __setup_argv_and_call_main or _main depending on
>> > whether or not inhibit_libc is defined?
>> 
>> Hmm...  Perhaps we should just inline __setup_argv_and_call_main into
>> the assembly start-up code, and remove it from newlib?  I wouldn't
>> object to a patch that did this.

> I think that code has external dependencies on the host OS?

On the target non-OS, actually.  __setup_argv_and_call_main is
currently only used in the newlib crt0.o, called from
sh-{elf,coff,hms}'s crt1.o.  gcc/config/sh/crt1.asm is not used for
sh-linux, so it's safe to move the code from newlib into crt1.asm.  I
didn't just because I didn't feel like coding that in assembly; it
should be easy enough to just take the optimized assembly output from
those functions and integrate it into crt1.asm, possibly with
additional hand-optimization.  I'd still keep the original source code
as comments in the assembly sources, though, for documentation
purposes.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


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