This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Cross-compiling GDB/GDBSERVER
- From: Daniel Jacobowitz <drow at false dot org>
- To: Itzhak Ben-Akiva <Itzhak dot Ben-Akiva at computer dot org>
- Cc: gdb at sourceware dot org
- Date: Tue, 16 Jan 2007 11:51:47 -0500
- Subject: Re: Cross-compiling GDB/GDBSERVER
- References: <f6df51f00701160015y5dd7153fh56f818fb8e33b74e@mail.gmail.com>
On Tue, Jan 16, 2007 at 10:15:27AM +0200, Itzhak Ben-Akiva wrote:
> However, when I try to connect to the gdbserver, I get the message I
> post below. gdb is trying to find the libraries in the wrong places
> instead of the right one, i.e., the toolchain build directory. What am
> I missing in the compilation? Should I set CFLAGS and LD_FLAGS to the
> path of the toolchain build directory?
You need to either use --with-sysroot when building gdb, set
solib-absolute-prefix, or "set sysroot" if you're using GDB HEAD.
I added a section about this common pitfall to the manual a few weeks
ago.
--
Daniel Jacobowitz
CodeSourcery