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

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


5.) *** Crucial Step*** Download this file, un-tar it and place its contents .i.e ar & ranlib in $IDIR/sslittle-na-sstrix/bin – FILE

This is really the most important step. If you did wrong in this step, there is no way to install it successfully. Also, if you follow the video,you will find some instructions he/she uses do not work on your ubuntu. So, what I did is to do it manually. Extract this file and you will get a folder,named ar&ranlib. Two files,ar and ranlib, are in this folder. And in the destination folder, also exist two files with the same name, ar and ranlib.REPLACE the old ones with the new ones.

You would also want to confirm that these files have “execution & write permission” You can do so by

1$ cd $IDIR/sslittle-na-sstrix/bin
2ls -al

If you see each file of this folder with write(w) & execution(x) permission then you are ready to go further. If not then you have to assign them the permission by using

chmod +w <filename> chmod +x <filename>


$ cd $IDIR/gcc-2.7.2.3

 make

Again you will face few errors

1.) Now you will get many insn-output.c errors. To solve this you need to add line breaks (‘\’) after each of the three FIXME (line 675, 750 and 823) in the insn-output.c
To open this file, use

1$ gedit insn-output.c
2make

2.) In objc/sendmsg.c, add the following code at line 35

#define STRUCT_VALUE 0
1cd $IDIR/gcc-2.7.2.3/objc
2chmod +w sendmsg.c
3$ gedit sendmsg.c
4cd ..
5make LANGUAGES="c c++" CFLAGS="-O" CC="gcc"

Here it is an "O",not zero.

3.) The last make command will lead to an error message which requires you to edit cxxmain.c file

To solve this you need to remove lines 2978-2979 in file cxxmain.c .i.e Remove the following lines

char * malloc (); char * realloc ();

To do so, use this command.

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

Now cross your fingers, because we are about to execute the final error free make command.

1make LANGUAGES="c c++" CFLAGS="-O" CC="gcc"
2make install  LANGUAGES="c c++" CFLAGS="-O" CC="gcc"


0 0
原创粉丝点击