Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* How to coerce gdb into pseudo-cross-compiling when build == host?
@ 2006-10-03 22:39 Kaz Kylheku
  2006-10-03 22:57 ` David Daney
  0 siblings, 1 reply; 5+ messages in thread
From: Kaz Kylheku @ 2006-10-03 22:39 UTC (permalink / raw)
  To: gdb

I'm building a Linux system from scratch. Everything builds for MIPS and
i686 using the same script, except for gdb.

The problem is that it thinks it's not being cross-compiled and starts
using plain "gcc" for compiling and linking, which brings in the build
system's local header files and libraries.

I want it to use the toolchain that my script built for it, which will
use the header files that I installed into the target filesystem tree,
and the libraries that the script built earlier: glibc, ncurses, etc.

I fooled gcc's configure into using "i686-linux-gcc" by lying to it
using --build=i686-bsd.

Everything worked.

But what's the a better way to do this, without lying about the OS?

Basically, the --build is totally irrelevant. It seem that I could put
in some nonsense like "mk68-solaris" and it would still work. Anything
/but/ the actual architecture and OS that I'm actually building on.


^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: How to coerce gdb into pseudo-cross-compiling when build == host?
@ 2006-10-03 23:16 Kaz Kylheku
  2006-10-03 23:44 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Kaz Kylheku @ 2006-10-03 23:16 UTC (permalink / raw)
  To: gdb

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: How to coerce gdb into pseudo-cross-compiling when build == host?
@ 2006-10-03 23:51 Kaz Kylheku
  0 siblings, 0 replies; 5+ messages in thread
From: Kaz Kylheku @ 2006-10-03 23:51 UTC (permalink / raw)
  To: gdb

> Daniel Jacobowitz:
> On Tue, Oct 03, 2006 at 04:16:25PM -0700, Kaz Kylheku wrote:
> > I lied to it by doing this:
> > 
> >   --build=i686-bsd
> >   --target=i686-linux
> >   --host=i686-linux
> > 
> > But there has to be a better way.
> 
> It is typical to use --build=i686-none-linux-gnu
> --host=i686-linux, or some variant thereof.

Thanks. That's what I was looking for; so we use the symbol
"none" for the system, which is different from "pc", and
off we go.


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

end of thread, other threads:[~2006-10-03 23:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-03 22:39 How to coerce gdb into pseudo-cross-compiling when build == host? Kaz Kylheku
2006-10-03 22:57 ` David Daney
2006-10-03 23:16 Kaz Kylheku
2006-10-03 23:44 ` Daniel Jacobowitz
2006-10-03 23:51 Kaz Kylheku

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