Dec 11, 2007

ubuntu 7.10 安裝simplescalar

參考資料:


NCTU CIS, Computer Architecture (CIS5136) Lab1

实验文档1-SimpleScalar安装@Ubuntu6.06

Adinarayanan Venkatachalam's installation logs of version-3.0

Install_guide_v2.txt from SimpleScalar

常見的編譯問題與解答:Installing SimpleScalar: common problems and their solutions Prepared by Mafijul Islam

SimpleScalar Installation Guide from Khalid Al-Issa

------------

下載

gcc-2.7.2.3.ss.tar.gz

simplesim-3v0d.tgz

simpletools-2v0.tgz

simpleutils-990811.tar.gz
simplesim & simpletools: http://www.simplescalar.com/tools.html
simpleutils: http://www.eecs.umich.edu/mirv/
gcc-2.7, ss patch : http://arch.cs.ucdavis.edu/RAD/gcc-2.7.2.3.ss.tar.gz

------------

編譯環境


# mkdir build

# export IDIR=/home/your-login-name/build

# cd $IDIR

# tar zxvf ../simpleutils-990811.tar.gz

# tar zxvf ../simplesim-3v0d.tgz


# tar zxvf ../simpletools-2v0.tgz

# rm ./gcc-2.6.3

# tar zxvf ../gcc-2.7.2.3.ss.tar.gz

(系統內的gcc版本似乎也要改,我換成gcc-3.3)

※ flex要換成 2.5.4版,flex --version,就可以看到版本號了

------------

Install simpleutils


# cd $IDIR/simpleutils-990811
# ./configure --host=i386-unknow-linux --target=sslittle-na-sstrix --with-gnu-as --with-gnu-ld --prefix=$IDIR


# make
# make install

------------

Install simplesim


# cd $IDIR/simplesim-3.0

# make config-pisa

# make

------------

Install gcc


# cd $IDIR/gcc-2.7.2.3

# ./configure --host=$HOST --target=sslittle-na-sstrix --with-gnu-as --with-gnu-ld --prefix=$IDIR

# make LANGUAGES="c c++" CFLAGS="-O3" CC="gcc"


# make install LANGUAGES="c c++" CFLAGS="-O3" CC="gcc"

----

※ 把build/glibc-1.09/stdio/stdio.h裡面第167行的 __NORETURN 刪掉

----

libgcc2.c:1419: stdio.h: No such file or directory

要改build/gcc-2.7.2.3/Makefile

LIBGCC2_INCLUDES = (大約在250行)

改成 LIBGCC2_INCLUDES = -I/usr/include

----

insn-output.c:824: error: stray '\' in program

編輯insn-output.c,把675, 750, 823行統統改成 return "FIXME\n\(加一個 \)

----

In file included from ./libgcc2.c:1419:
/home/fyodor/homework/Q2/build/sslittle-na-sstrix/include/stdio.h:167: parse error before `void'
make: *** [libgcc2.a] Error 1

$IDIR/sslitle-na-sstrix/include/sys/cdefs.h把換成patch過的檔案
# cp $IDIR/gcc-2.7.2.3/patched/sys/cdefs.h $IDIR/sslitle-na-sstrix/include/sys/cdefs.h


1 comments:

abs said...

I'm trying to install simplescalar on my Ubuntu also but got stuck at the moment. Wonder if you can help me.

I always get errors like "make[3]: *** [arparse.c] Error 1" when I do 'make' at the 'Install Simputils step.

Any idea?

Thanks in advance.

Post a Comment