* 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:16 How to coerce gdb into pseudo-cross-compiling when build == host? Kaz Kylheku
@ 2006-10-03 23:44 ` Daniel Jacobowitz
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2006-10-03 23:44 UTC (permalink / raw)
To: Kaz Kylheku; +Cc: gdb
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.
However, to see why the default build wasn't working for you, we'd have
to have more detailed information about how it had failed.
--
Daniel Jacobowitz
CodeSourcery
^ 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
* Re: 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, 0 replies; 5+ messages in thread
From: David Daney @ 2006-10-03 22:57 UTC (permalink / raw)
To: Kaz Kylheku; +Cc: gdb
Kaz Kylheku wrote:
> 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.
'path_to_gdb/configure --build=i686-pc-linux-gnu --target=mipsel-linux
--host=mipsel-linux' does not work for you?
I (sucessfully) cross build gdb with that exact configure command.
I should also note that I have never had to lie to configure in the
manner you suggest for gcc either. The configure system for gdb,
binutils and gcc works well for cross building in all the cases I have
tried.
David Daney
^ permalink raw reply [flat|nested] 5+ messages in thread
* 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
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 23:16 How to coerce gdb into pseudo-cross-compiling when build == host? Kaz Kylheku
2006-10-03 23:44 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2006-10-03 23:51 Kaz Kylheku
2006-10-03 22:39 Kaz Kylheku
2006-10-03 22:57 ` David Daney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox