This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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: [patch/testcase] gdb.asm/m32r.inc: fix compile error


On Wed, Aug 06, 2003 at 10:48:46AM +0900, Kei Sakamoto wrote:
> > Two minor things:
> >   - You accidentally sent a reversed diff.
> >   - ChangeLog formatting.  It should be:
> >
> > 2003-08-04  Kei Sakamoto  <sakamoto.kei@renesas.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?

-nostartfiles should prevent the inclusion of crt* but not of libgloss;
libgloss is a matter for -nostdlib, which we _don't_ use.  I see that
in the m32r GCC port, -lgloss is in ENDFILE_CPU_SPEC, which is unlike
any other port.

I don't want to mess with that right now, but does adding -lgloss to
${link-flags} in asm-source.exp fix the problem?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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