[patch/testcase] gdb.asm/m32r.inc: fix compile error
Fri Aug 8 16:02:00 GMT 2003
Kei Sakamoto writes:
> > Two minor things:
> > - You accidentally sent a reversed diff.
> > - ChangeLog formatting. It should be:
> > 2003-08-04 Kei Sakamoto <email@example.com>
> > * gdb.asm/m32r.inc: Add several missing symbols. Replace ld24
> > with seth/add3.
> Sorry about that.
> > One less minor thing: no other port needs to declare symbols. It looks
> > like part of libc is being dragged in somehow on m32r; could you
> > explain why the symbols are necessary?
> asm-source is compiled with -nostartfiles. So gcc does not use libgloss.a.
> But on m32r, somehow several system calls, _write, etc., are included
> in it. So it is necessary to declare these symbols. On other architectures,
> these system calls are included in libc.a, which is not removed
> by -nostartfiles.
> Unfortunately, I don't know why m32r's libgloss is different from others.
> Should I modify libgloss and newlib rather than declare symbols in m32r.inc?
Imagine wanting to use libc in multiple environments,
the only difference between them is how the "board support package"
works. There isn't necessarily one way that systems in which
a particular chip is placed implements system calls (for example).
Does one provide separate libc's for each?
Or does one factor out the board level issues from libc
and keep them separate.
This is how newlib+libgloss is intended to work.
It doesn't on some targets for various reasons.
For some older ports libgloss may not have existed at the time.
Thus, IMO, no you don't want to move libgloss into newlib.
More information about the Newlib