This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

possible success with h8300 cross egcs


Below is a listing of the procedure I used to build a linux hosted
h8/300 toolchain for development with the hitachi H8/3644F processor
(HD64F3644).

It's very likely I didn't use the canonical or most efficient method to
do
this, I'd appreciate comments.

Also note the error on building libf2c during the cross build, shouldn't
libf2c have been excluded from the config in a cross build --with-newlib
and LANGUAGES set to "c c++" ???

Lastly, the compiler seems to run ok, but there's a problem with the
linker
giving me "Segmentation fault (core dumped)" whenever I attempt to
include
a library or archive file with my link.
i.e. by adding -lc to linker command line, or INPUT(anything.a) to the
linker
command script.  Any ideas for the cause of that?


-- 
|\/|
|/\| randall@elgar.com
|\/| rsl@zanshinsys.com http://www.zanshinsys.com

//
//	unpack the archives
//

tar xvzf binutils-2.9.1.tar.gz
tar xvzf egcs-1.1b.tar.gz
tar xvzf newlib-1.8.1.tar.gz


//
//	create build directories
//

mkdir build-binutils
mkdir build-egcs

//
//	using current system (redhat 4.2, binutils 2.7.0.2-4, gcc 2.7.2.1-2)
//	build the new native binutils
//
cd build-binutils
../binutils-2.9.1/configure \
	--prefix=/usr/local/crossgcc \
	--exec-prefix=/usr/local/crossgcc/i586-pc-linux-gnulibc1
make all
make install

//
//	add the new binutils to front of path
//
export PATH=/usr/local/crossgcc/i586-pc-linux-gnulibc1/bin:$PATH


//
//	build the new native egcs compiler
//
cd ../build-egcs
../egcs-1.1b/configure --prefix=/usr/local/crossgcc \
	--exec-prefix=/usr/local/crossgcc/i586-pc-linux-gnulibc1
make bootstrap
make install

//
//	wipe out native binutils and compiler build obj's
//
cd ..
rm -rf build-binutils/*
rm -rf build-egcs/*

//
//	build h8 version of binutils
//
cd build-binutils
../binutils-2.9.1/configure --target=h8300-hitachi-hms \
	--prefix=/usr/local/crossgcc \
	--exec-prefix=/usr/local/crossgcc/i586-pc-linux-gnulibc1
make all
make install

//
//	add newlib source dir link to egcs source tree
//
cd ..
ln -s newlib-1.8.1/newlib egcs-1.1b/newlib

//
//	build h8 version egcs
//
cd ../build-egcs
../egcs-1.1b/configure \
	--target=h8300-hitachi-hms \
	--prefix=/usr/local/crossgcc \
	--exec-prefix=/usr/local/crossgcc/i586-pc-linux-gnulibc1 \
	--with-newlib \
	--enable-target-optspace

make cross LANGUAGES="c c++" install

//
//	build stops with an error
// 	in file build-egcs/h8300-hitachi-hms/libf2c/config.log
//
 configure:1062: #error "Cannot find a suitable type for F2C_LONGINT"

//
//	ok, remove libf2c from the build,
//
cd ../egcs-1.1b
mv libf2c ..
cd ../build-newlib

make cross LANGUAGES="c c++" install