This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PPC->i386 cross-gcc


OK, I've gotten not much feedback, whch is depressing, but I'll try again.

My goal: build a cross-gcc for ppc->i386

The steps below work fine on a i386 box, but fail when I try to duplicate
them on a ppc iMac.

# configure/build binutils

cd binutils-2.13.2.1

./configure --prefix=/home/jeff/crosscomp --target=i386-linux
--host=powerpc-linux

make
make install

mkdir /home/crosscomp/include
cd /home/crosscomp/include
cp -ai /usr/include/* .
rm -rf asm
rm -rf linux
cp -ai /usr/src/linux/include/i386-asm asm
cp -ai /usr/src/linux/include/linux .

# configure/build bootstrap gcc

export TPATH=$PATH
export PATH=/home/jeff/crosscomp/bin:$PATH
cd gcc-3.2.2

./configure --prefix=/home/jeff/crosscomp \
--host=powerpc-linux --target=i386-linux \
--with-headers=/home/jeff/crosscomp/include \
--disable-shared --disable-nls --enable-languages=c

make
make install
export PATH=$TPATH

export AR=/home/jeff/crosscomp/i386-linux/bin/ar
export CC=/home/jeff/crosscomp/i386-linux/bin/gcc
export RANLIB=/home/jeff/crosscomp/i386-linux/bin/ranlib

#configure/build glibc

mkdir /home/jeff/build-glibc
cd /home/jeff/build-glibc

/home/jeff/glibc-2.3.1/configure --prefix=/home/jeff/crosscomp \
--host=i386-linux --build=powerpc-linux --enable-add-ons \
--with-headers=/home/jeff/crosscomp/include \
--with-libs=/home/jeff/crosscomp/lib --enable-shared --disable-nls \
--enable-threads=posix

make
make install

export AR=
export CC=
export RANLIB=

# configure/build full gcc

export PATH=/home/jeff/crosscomp/bin:$PATH
sudo rm -rf gcc-3.2.2
tar xvfz crosssrc/gcc-3.2.2.tar.gz
cd gcc-3.2.2

./configure  --host=powerpc-linux \
--build=powerpc-linux  --target=i386-linux \
--prefix=/home/jeff/crosscomp \
--with-headers=/home/jeff/crosscomp/include \
--with-libs=/home/jeff/crosscomp/lib --enable-shared --disable-nls \
--enable-add-ons --enable-threads=posix --enable-languages=c,c++

make
make install

This final step (which works on a i386 box) fails on the ppc


> 
> ==============
> In file included from /home/jeff/i386/include/math.h:362,
>  from /home/jeff/gcc-3.2.2/i386-linux/libstdc++-v3/include/cmath:51,
> from
>
/home/jeff/gcc-3.2.2/i386-linux/libstdc++-v3/include/bits/locale_facets.tcc:4
> 1, from /home/jeff/gcc-3.2.2/i386-linux/libstdc++-v3/include/locale:46,
> from
>  /home/jeff/gcc-3.2.2/i386-linux/libstdc++-v3/include/bits/ostream.tcc:37,
>  from /home/jeff/gcc-3.2.2/i386-linux/libstdc++-v3/include/ostream:275,
>  from /home/jeff/gcc-3.2.2/i386-linux/libstdc++-v3/include/bitset:58, from
>  bitset.cc:43:
> /home/jeff/i386/include/bits/mathinline.h: In function `double
>  log1p(double)': /home/jeff/i386/include/bits/mathinline.h:539: `logl'
>  undeclared (first use this function)
> /home/jeff/i386/include/bits/mathinline.h:539: (Each undeclared identifier
> is
>    reported only once for each function it appears in.)
> make[3]: *** [bitset.lo] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all-recursive-am] Error 2
> make: *** [all-target-libstdc++-v3] Error 2


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