This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
How to coerce gdb into pseudo-cross-compiling when build == host?
- From: "Kaz Kylheku" <kaz at zeugmasystems dot com>
- To: <gdb at sourceware dot org>
- Date: Tue, 3 Oct 2006 15:39:53 -0700
- Subject: How to coerce gdb into pseudo-cross-compiling when build == host?
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.