crt0 formalization

Jeff Johnston jjohnstn@redhat.com
Thu Dec 7 18:08:00 GMT 2006


Joel Sherrill wrote:
> jschopp wrote:
>>> I'm confused.  Which way are you suggesting it be done for the spu?
>>
>> In newlib.
> 
> If I am reading the patch correctly, you put it in
> libgloss which is essentially a Board Support Package
> for no operating system.  Thus it will only be available
> for the spu-elf target.
> 
> I don't think that's the best place for it since
> this means that that no spu-OS (not spu-OBJECT_FORMAT)
> target will pick it up there.
> In fact, I am disappointed that the other four targets
> have it in libgloss. It may be allowed but it doesn't
> seem like the best choice.  I know if there were an RTEMS
> port to any of the targets which have the crt[in] in
> libgloss, it would have to be copied to somewhere else for
> XXX-rtems to have access to it.
> 

I've been sick for the last two days so forgive my silence.

The reason libgloss is used over newlib is that when something gets put 
in newlib, it becomes difficult to override if one needs to change it 
for a particular board.

If the code in question will be universal across all spu boards and OSes 
that will run on spu, then it can go unconditionally in libc/machine/spu.

Otherwise, I suggest we leave the patch as-is and then also add the code 
to libc/machine/spu where configure tells it to be added or not (e.g. 
spu-*-rtems, add the two files).  Seem reasonable?

> RTEMS doesn't use libgloss so I need to ask: does
> libgloss get built multilib?  If not, that could be
> another potential downside with putting them there.
> 

Yes, libgloss gets built multilib.

-- Jeff J.



More information about the Newlib mailing list