This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch for arm-linux gdbserver


Guys:


Got it!  Well, it *builds* anyway.  My arm-linux target is so messed
up right now, it'll be a few hours before I can run it.

See previous posts on building ncurses and bfd, and configuring gdb
for --host=arm-linux...  Here's where I hacked next.

After configuring gdb, edit <builddir>/gdbserver/Makefile:

I changed BFD_CFLAGS to this:

BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC) \
    -I/home/bgat/H-arm-cerfpod-linux-gnu/include

Because that's where my bfd.h is.  Next, I added this to INCLUDE_CFLAGS:

-I /home/bgat/H-arm-cerfpod-linux-gnu/arm-linux/include

because that's where I put my target-specific toolchain, in particular
my configured linux kernel headers (including all the symlinks).

Then I created a bogus include/sys dir and reg.h:

mkdir -p /home/bgat/H-arm-cerfpod-linux-gnu/arm-linux/include/sys
touch /home/bgat/H-arm-cerfpod-linux-gnu/arm-linux/include/sys/reg.h

I couldn't figure out the right way to unset the #define in
low-linux.c, so I figured why not...

Finally, I added -static to GLOBAL_CFLAGS.

Then it's:

$  CC=arm-linux-gcc make
$  file gdbserver
gdbserver: ELF 32-bit LSB executable, ARM, version 1, statically linked, not stripped


But does the resulting executable *work*?  I'll know in a bit.


> Basically, this is because we abuse gdb's configure quite badly.  I
> recommend that you build a small curses library or grab one from an
> m68k disribution or what-have-you, and ignore the problem for now. 
> I'll see about fixing this a little down the road.

Yea, we're doing a number on it here.  :^)



b.g.
-- 
Bill Gatliff
bgat@billgatliff.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]