cross-compile GDB ?
Paul Koning
pkoning@equallogic.com
Thu Sep 13 18:41:00 GMT 2007
>>>>> "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
More information about the Gdb
mailing list