Cross compiling with the i386-elf toolchain?
David Smoot
davidsmoot at gmail.com
Wed Oct 4 06:43:12 PDT 2006
I'm trying to learn cross compiling out of curiousity for an idea I'm
playing with at work.
I have a powerbook G4 (ppc) with the i386-elf port for GCC and binutils
installed. I'm trying to compile a simple "hello world" application that
just has a single printf.
In a terminal I type:
i386-elf-gcc-3.4.3 -c main.c
and I get the expected main.o
now I type
i386-elf-gcc-3.4.3 -o hello main.o
and I get:
/opt/local/lib/gcc/i386-elf/3.4.3/../../../../i386-elf/bin/ld: crt0.o: No
such file: No such file or directory
So my problem is linking. I've exhausted my google abilities and
knowledge. I think I need something like:
i386-elf-gcc-3.4.3 -o hello main.o -I/opt/local/i386-elf/include -Wl,
-nostdlib but so far I cannot figure it out.
If someone will help me figure out a simple "hello world" cross compile
recipe for these tools I would be most appreciative.
Thanks
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20061004/caaec96f/attachment.html
More information about the macports-users
mailing list