Re: Building a cross-gdb with host=i686-pc-linux-gnu and target=powerpc-apple-darwin
Re: Building a cross-gdb with host=i686-pc-linux-gnu and target=powerpc-apple-darwin
- Subject: Re: Building a cross-gdb with host=i686-pc-linux-gnu and target=powerpc-apple-darwin
- From: Gregor Riepl <email@hidden>
- Date: Sat, 5 Jun 2004 15:02:40 +0200
- Organization: HTA Biel
On Tuesday 01 June 2004 23:38, Andrew Gallatin wrote:
>
> Has someone done this?
>
>
Yes, about 2 years ago. It was an ugly, nasty hacking session and
>
I've since thrown away the build tree, and I did not take good notes.
Lucky! I was able to resolve all issues with Apple's sourcecode.
Most problems were just stupid errors in the code, which I think should break
compiling even on OSX...
It wasn't easy to find the bug causes because of some deeply nested macros.
With the attached patch and the required headers, as stated below, you should
be able to compile a cross-gdb for darwin on any recent POSIX system.
I couldn't fully test the functionality, but starting, loading mach-o binaries
and symbol files and attaching to a remote machine work. Typing 'continue'
woke up the Mac, too.
I'll be using the binary now, so if someone's interested, I can give you a
more detailed report later.
When I've got the time, this info and the patch will be available on my
homepage.
Instructions:
- Create a directory in /usr/include, i.e. /usr/include/darwin
- Copy the following files and directories (with contents!) from an OSX system
osx:/usr/include/mach -> posix:/usr/include/darwin/mach
osx:/usr/include/sys/appleapiopts.h ->
posix:/usr/include/darwin/sys/appleapiopts.h
osx:/usr/include/architecture -> posix:/usr/include/darwin/architecture
osx:/usr/include/libkern -> posix:/usr/include/darwin/libkern
osx:/usr/include/mach_debug -> posix:/usr/include/darwin/mach_debug
osx:/usr/include/mach-o -> posix:/usr/include/darwin/mach-o
- Get and unpack gdb-309.tar.gz somewhere
- Change into gdb-309/src
- Apply the patch:
# patch -p0 < /tmp/apple-gdb-309-cross.patch
- Configure with:
# CFLAGS=-I/usr/include/darwin ./configure --target=powerpc-apple-darwin
- Build and install with:
# make
# sudo make install
- This will give you powerpc-apple-darwin-gdb and a few other tools
[demime 0.98b removed an attachment of type text/x-diff which had a name of apple-gdb-309-cross.patch]
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.