nstalling GCC Cross-Compiler
This is the important step where most of the newbies (including me) are/were struggling. So please follow these steps carefully.
2 | $ tar xzvf gcc-2.7.2.3.ss_. tar .gz |
4 | $ export PATH=$PATH:/home/YOUR_USER_NAME/simplescalar/sslittle-na-sstrix/bin |
5 | $./configure –host=$HOST –target=$TARGET –with-gnu-as –with-gnu-ld –prefix=$IDIR |
Now before you proceed ahead, there are quite a few corrections that have to be made in some files:1.) Change the Makefile at line 130, by appending –I/usr/include to the end of the lineTo do so you can use command
2.) Edit line 60 of protoize.c, and replace
#include <varargs.h> with #include <stdarg.h>
To do so you can use command
—3.) Edit obstack.h at line 341 and change
*((void **)__o->next_free)++=((void *)datum);
with
*((void **)__o->next_free++)=((void *)datum);
To do so you can use the following command
—4.) Copy the patched files located in the patched directory to avoid some parse errors while compiling. To do so use the following command.
1 | $ cp ./patched/sys/cdefs.h ../sslittle-na-sstrix/include/sys/cdefs.h |
2 | $ cp ../sslittle-na-sstrix/lib/libc.a ../lib/ |
3 | $ cp ../sslittle-na-sstrix/lib/crt0.o ../lib/ |
*If you dont find the patched directory in your browser, you probably didnt unrar it properly. Again unrar the GCC tar file “at a different location” (say your Desktop) and copy from it.