您的位置:首页 > 其它

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

2014-01-06 10:14 393 查看

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.
1
$
cd
$IDIR
2
$
tar
xzvf gcc-2.7.2.3.ss_.
tar
.gz
3
$
cd
gcc-2.7.2.3
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
1
$gedit Makefile

2.) Edit line 60 of protoize.c, and replace
#include <varargs.h> with #include <stdarg.h>
To do so you can use command
1
$
chmod
+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
1
$
chmod
+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.
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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: