Computer Architecture project——simplescalar under Ubuntu/在Ubuntu10.04下安装simplescalar第二部分

来源:互联网 发布:租用阿里云vps 编辑:程序博客网 时间:2024/05/01 00:04

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.

1cd $IDIR
2tar xzvf gcc-2.7.2.3.ss_.tar.gz
3cd gcc-2.7.2.3
4exportPATH=$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 line

To do so you can use command

1$ gedit Makefile

makefile

2.) Edit line 60 of protoize.c, and replace

#include <varargs.h> with #include <stdarg.h>

To do so you can use command

1chmod +w protoize.c
2$ gedit protoize.c

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

1chmod +w obstack.h
2$ gedit obstack.h

4.) Copy the patched files located in the patched directory to avoid some parse errors while compiling. To do so use the following command.

1cp ./patched/sys/cdefs.h ../sslittle-na-sstrix/include/sys/cdefs.h
2cp ../sslittle-na-sstrix/lib/libc.a ../lib/
3cp ../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.

0 0
原创粉丝点击