Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* cross-compile GDB ?
@ 2007-09-13 18:36 Joel Brobecker
  2007-09-13 18:41 ` Paul Koning
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Joel Brobecker @ 2007-09-13 18:36 UTC (permalink / raw)
  To: gdb

Hello,

I was wondering if anyone had tried cross-compiling GDB. My goal
is to build gdbserver for LynxOS 3 from a sparc-solaris machine.
Adding native support for LynxOS could take a while, but I think
that adding LynxOS support to the gdbserver would allow me to use
my version of GDB server. The one that they distribute with LynxOS 3
is too old and doesn't work well with newer versions of GDB (I think).

Is that possible at all? Right now, libiberty complains because it
is trying to test the compiler on the host by trying to run a small
test executable. It suggests to use the --host switch, but doing that
didn't help.

Thanks,
-- 
Joel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cross-compile GDB ?
  2007-09-13 18:36 cross-compile GDB ? Joel Brobecker
@ 2007-09-13 18:41 ` Paul Koning
  2007-09-13 18:58   ` Joel Brobecker
  2007-09-13 18:47 ` DJ Delorie
  2007-09-14 13:17 ` Stan Shebs
  2 siblings, 1 reply; 5+ messages in thread
From: Paul Koning @ 2007-09-13 18:41 UTC (permalink / raw)
  To: brobecker; +Cc: gdb

>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

 Joel> Hello, I was wondering if anyone had tried cross-compiling
 Joel> GDB. My goal is to build gdbserver for LynxOS 3 from a
 Joel> sparc-solaris machine.  Adding native support for LynxOS could
 Joel> take a while, but I think that adding LynxOS support to the
 Joel> gdbserver would allow me to use my version of GDB server. The
 Joel> one that they distribute with LynxOS 3 is too old and doesn't
 Joel> work well with newer versions of GDB (I think).

 Joel> Is that possible at all? Right now, libiberty complains because
 Joel> it is trying to test the compiler on the host by trying to run
 Joel> a small test executable. It suggests to use the --host switch,
 Joel> but doing that didn't help.

It works for me; we routinely build gdb (including gdbserver) for a
mips target on an i386 host.  The switches are --host=<mipstarget>
--target=<mipstarget> --build=<i386host>.  And of course you need a
toolchain (compiler etc) for the target.

I may have had to pass CC=<targetcompilername> as well, I'm not sure
if that's needed.

   paul


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cross-compile GDB ?
  2007-09-13 18:36 cross-compile GDB ? Joel Brobecker
  2007-09-13 18:41 ` Paul Koning
@ 2007-09-13 18:47 ` DJ Delorie
  2007-09-14 13:17 ` Stan Shebs
  2 siblings, 0 replies; 5+ messages in thread
From: DJ Delorie @ 2007-09-13 18:47 UTC (permalink / raw)
  To: brobecker; +Cc: gdb


The thing with libiberty can be solved by adding a lynxos-specific
clause in libiberty's configury that tells it which library functions
lynxos has, much like we already have for newlib, cygwin, and djgpp.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cross-compile GDB ?
  2007-09-13 18:41 ` Paul Koning
@ 2007-09-13 18:58   ` Joel Brobecker
  0 siblings, 0 replies; 5+ messages in thread
From: Joel Brobecker @ 2007-09-13 18:58 UTC (permalink / raw)
  To: Paul Koning; +Cc: gdb

> It works for me; we routinely build gdb (including gdbserver) for a
> mips target on an i386 host.  The switches are --host=<mipstarget>
> --target=<mipstarget> --build=<i386host>.  And of course you need a
> toolchain (compiler etc) for the target.

Aha, I completely forgot about the --build switch... That gets me past
this first hurdle. Thanks!

-- 
Joel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cross-compile GDB ?
  2007-09-13 18:36 cross-compile GDB ? Joel Brobecker
  2007-09-13 18:41 ` Paul Koning
  2007-09-13 18:47 ` DJ Delorie
@ 2007-09-14 13:17 ` Stan Shebs
  2 siblings, 0 replies; 5+ messages in thread
From: Stan Shebs @ 2007-09-14 13:17 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb

Joel Brobecker wrote:
> Hello,
>
> I was wondering if anyone had tried cross-compiling GDB. My goal
> is to build gdbserver for LynxOS 3 from a sparc-solaris machine.
> Adding native support for LynxOS could take a while, but I think
> that adding LynxOS support to the gdbserver would allow me to use
> my version of GDB server. The one that they distribute with LynxOS 3
> is too old and doesn't work well with newer versions of GDB (I think).
>   
Ironically, Stu Grossman wrote gdbserver for Lynx originally - you can 
retrace a bit of the history in ChangeLog-1993.

Stan


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-09-13 20:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-13 18:36 cross-compile GDB ? Joel Brobecker
2007-09-13 18:41 ` Paul Koning
2007-09-13 18:58   ` Joel Brobecker
2007-09-13 18:47 ` DJ Delorie
2007-09-14 13:17 ` Stan Shebs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox