Hello, everyone!
I'm wondering if someone can help me with building cross-compiler.
Of course I've read http://wiki.osdev.org/GCC_Cross-Compiler and http://wiki.osdev.org/OS_Specific_Toolchain.
My problem is when I compile it, i can't complete third step because i recieve a lot of errors like : "i586-pc-myos-ld: unrecognised emulation mode..." etc. I can't also build libgcc - it can't find rules for make T_TARGET and I had trouble with newlib and i586-elf-ranlib(unknown command) at second step.
I compile & test the code on Linux Ubuntu 10.10 x32
I tried to build two cross-compilers:
- GCC 4.5.2 + Binutils 2.21.1
- GCC 4.4.3 + Binutils 2.20.0
I don't know where exactly i've made a mistake. Could you help me, please?
Michael.
Help with Cross-Compiler
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Re: Help with Cross-Compiler
It sounds like it has no idea what it's trying to target. Are you sure you patched all the files in the tree as per the tutorial? Didn't miss one, or skip one?
If not, a bit more information is needed:
If not, a bit more information is needed:
- A diff between a standard GCC/binutils directory tree and your modified one
- The exact commands you are running
- The error, verbatim, and 4-5 lines of context.
Re: Help with Cross-Compiler
Thanks for your response. I solved the T_TARGET problem - I had bad dirs tree and there is no problems with building binutils, gcc and libgcc at first step.
Now I've got trouble with newlib - it looks for i586-elf-cc. Is it the same as i586-elf-gcc ?
Now I've got trouble with newlib - it looks for i586-elf-cc. Is it the same as i586-elf-gcc ?
Code: Select all
make[5]: Entering directory `/usr/src/build-newlib/i586-elf/newlib/libc/argz'
i586-elf-cc -B/usr/src/build-newlib/i586-elf/newlib/ -isystem /usr/src/build-newlib/i586-elf/newlib/targ-include -isystem /usr/src/build-newlib/newlib-1.19.0/newlib/libc/include -B/usr/src/build-newlib/i586-elf/libgloss/i386 -L/usr/src/build-newlib/i586-elf/libgloss/libnosys -L/usr/src/build-newlib/newlib-1.19.0/libgloss/i386 -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.19.0\" -DPACKAGE_STRING=\"newlib\ 1.19.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I../../../.././newlib-1.19.0/newlib/libc/argz -DMISSING_SYSCALL_NAMES -fno-builtin -g -O2 -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../.././newlib-1.19.0/newlib/libc/argz/'`dummy.c
/bin/bash: i586-elf-cc: command not found
make[5]: *** [lib_a-dummy.o] Error 127
make[5]: Leaving directory `/usr/src/build-newlib/i586-elf/newlib/libc/argz'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/src/build-newlib/i586-elf/newlib/libc'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/build-newlib/i586-elf/newlib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/build-newlib/i586-elf/newlib'
make[1]: *** [all-target-newlib] Error 2
make[1]: Leaving directory `/usr/src/build-newlib'
make: *** [all] Error 2