How to coerce gdb into pseudo-cross-compiling when build == host?

Kaz Kylheku kaz@zeugmasystems.com
Tue Oct 3 23:16:00 GMT 2006


David Daney wrote: 
> Kaz Kylheku wrote:
> > I'm building a Linux system from scratch. Everything builds 
> for MIPS and
> > i686 using the same script, except for gdb.
> 
> 'path_to_gdb/configure --build=i686-pc-linux-gnu 
> --target=mipsel-linux 
> --host=mipsel-linux' does not work for you?

Oops, I didn't make myself perfectly clear. The MIPS cross-compile
works fine. It's when I have

  --build=i686-linux
  --target=i686-linux
  --host=i686-linux

that it decides that there is no cross-compiling, and starts
just using plain gcc for compiling and linking. So gdb ends
up picking up my local /lib/libncurses.so.5.

I lied to it by doing this:

  --build=i686-bsd
  --target=i686-linux
  --host=i686-linux

But there has to be a better way.



More information about the Gdb mailing list