From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Robison To: Bill Webster Cc: CrossGCC Subject: Re: cross-compiler intel -> powerpc-gnu-linux Date: Wed, 14 Jun 2000 06:22:00 -0000 Message-id: References: <3946AC5C.CADFE0BE@lineo.com> X-SW-Source: 2000-q2/msg00235.html Bill, This looks like a good setup -- but it doesn't work for me. I'm playing around with it now, maybe I can figure something out. What is the difference between the gcc-core and gcc distributions? I thought maybe that would help, but it hasn't. My main problem with your instructions is that when building gcc it can't find include files like stdlib.h and unistd.h. This happens when compiling libgcc2.c, while building gcc. You didn't reference any 'with-headers=' line on your gcc configure example. Did you really get it to work without one? The main issue, it seems, is that to build gcc certain header files must be found. These seem to live in the glibc distribution, but in a funny place. i.e. the stdlib.h file that is in the glibc/include directory merely includes and there are a number of other examples like that. It sort of appears that glibc needs to be built first (or re-structured somehow) before the gcc build can use its include files. Maybe gcc shouldn't be using glibc's include files, but if not, I don't know how to resolve the stdlib.h, etc references in libgcc2.c bob On 13-Jun-00 Bill Webster wrote: > These are the steps that I followed to build the cross-compiler I am currently using (I am > reasonably > certain that these are quite complete): > ># Packages: ># binutils-2.9.5.0.46.tar.gz ># gcc-core-2.95.2.tar.gz ># linux-2.2.15.tar.gz ># glibc-2.1.3.tar.gz ># glibc-crypt-2.1.tar.gz ># glibc-linuxthreads.2.1.3.tar.gz ># > ># Unpackage source > ># Set up some environment vars > host=i686-linux > target=powerpc-linux > prefix=/opt/test > tprefix=${prefix}/${target} > bin=${prefix}/bin > binutils=../binutils-2.9.5.0.46 > gcc=../gcc-2.95.2 > glibc=../glibc-2.1.3 > kernel=../linux-2.2.15 > ># Do some cleanup (if necessary) and prep work > rm -fr binutils-build gcc-build glibc-build > mkdir binutils-build gcc-build glibc-build > ># Build tool chain > cd ${base}/binutils-build > ${binutils}/configure --srcdir=${binutils} --prefix=${prefix} --target=${target} > make all > > > cd ${base}/gcc-build > ${gcc}/configure --srcdir=${gcc} --prefix=${prefix} --target=${target} > export PATH=${bin}:${PATH} > make all > > ># Install kernel headers > ># Edit ${kernel}/Makefile, change line 'ARCH := ...' to 'ARCH := ppc' > ># In 'Platform support' select correct 'Processor type' and 'Machine type' and exit ># with save > ># Copy kernal include files into tool chain install directory > > > ># Finish tool chain > cd ${base}/glibc-build > CC=${target}-gcc > ${glibc}/configure --srcdir=${glibc} --prefix=${tprefix} --build=${host} > --enable-add-ons=crypt,linuxthreads --with-headers=${tprefix}/include ${target} > make all > > > All of the steps that are enclosed in '<...>' are steps which are performed while logged in as > root. ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com