Building Native ToolChain (SH3)

Kristoffer Ericson Kristoffer@jlime.com
Wed Aug 10 11:07:00 GMT 2005


Greetings,

Here is my progress so far, in building a native sh3 compiler (by using
CrossTool), hope this helps:

Binutils-2.16
-------------
./configure --host=sh3-unknown-linux-gnu --build=i686 --prefix=""
make
make DESTDIR=/tempdir install
(tar and gzip)

Glibc-2.3.5
------------
BUILD_CC=gcc CFLAGS=-O CC=sh3-unknown-linux-gnu-gcc AR=sh3-unknown-linux-gnu-ar
RANLIB=sh3-unknown-linux-gnu-ranlib ../../sourcedir/glibc-2.3.5/.configure
--build=i686 --host=sh3-unknown-linux-gnu --enable-kernel=2.4.3 --without-cvs
--disable-profile --disable-debug --without-gd --without-tls --without-__thread
--enable-shared --enable-add-ons=linuxthreads
--without-headers=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/sh3-unknown-linux-gnu/sh3-unknown-linux-gnu/include
--without-fp

make LD=sh3-unknown-linux-gnu-ld RANLIB=sh3-unknown-linux-gnu-ranlib
make install_root=/tempdir install
(tar and gzip)

Notes:
Sh3 should be without fp?
setting optimization to -O otherwise it complains about assembly problems


GCC-3.4.4
---------
CFLAGS=-O CC=sh3-unknown-linux-gnu-gcc NM=sh3-unknown-linux-gnu-nm
AR=sh3-unknown-linux-gnu-ar ./configure --host=sh3-unknown-linux-gnu
--build=i686 --enable-languages=c,c++ --prefix=/

make
make DESTDIR=/tempdir install

Notes: Setting Optimization to -O otherwise getting assembler problems.
Adding additional languages makes the compilation fail, also make bootstrap.


This leaves me with one error left, when it tries to compile something it
complains about not finding crt1.o (its in /lib). Changing stuff in ld.so.conf
doesnt help. Any Ideas?

Otherwise i believe this toolchain should work.

Best wishes
Kristoffer Ericson
www.jlime.com


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list