This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: documentation for cross compiling.
Alexandre Oliva wrote:
>
> 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.
I don't understand the full implications of this change, since I haven't
looked through newlib yet, but as long as it breaks the sh-coff/sh-elf
dependency on newlib and enables a full working compiler to be built
without
newlib installed, I'm all for it.
Toshi