Compile GCC for SimpleScalar

by

How to compile gcc-2.7.2.3 for SimpleScalar-pisa:

First, get:

simpletools.tar.gz
gcc-2.7.2.3.ss.tar.gz
simpleutils-990811.tar.gz

Unpack all, you should have at least these 3 directories:

gcc-2.7.2.3/
simpleutils-990811/
sslittle-na-sstrix/

and other directories (but these are important).

Choose the prefix directory (destination, where to install the binaries).
I chose ~/opt/gcc-ss

Copy ssbig-na-sstrix to your prefix directory.

Create another two directories, e.g. build1, build2

To compile, do:

> cd build1
>../simpleutils-990811/configure --target=sslittle-na-sstrix --with-gnu-as
--with-gnu-ld --prefix=$HOME/opt/gcc-ss
> make
> make install

Comment out the following line in gcc-2.7.2.3/cccp.c:

...
#if defined(bsd4_4)
extern const char *const sys_errlist[];
#else
//extern char *sys_errlist[]; <--
#endif
...

> cd ../build2
>../gcc-2.7.2.3/configure --target=sslittle-na-sstrix --with-gnu-as --with-gnu-ld
--prefix=$HOME/opt/gcc-ss
>make LANGUAGES="c" CFLAGS="-O3" CC="gcc"
>make install LANGUAGES="c" CFLAGS="-O3" CC="gcc"

Done!

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: