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

See the CrossGCC FAQ for lots more infromation.


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

Re: Expert help required with building linux hosted crossGCC targeting MPC860


Daniel Zajc wrote:

> I am trying to create a cross compiler from gcc 2.95.2 sources.
> The cross compiler is to be hosted on a linux x86 (P3 450) PC but I want
> it to
> target an embedded system with a Motorola MPC850 (860 for all intents &
> purposes).
>
> I set up the following directories:
>
> /usr/local/cross-gcc/src    # all source code tar -zxvf unpacked here
> /usr/local/cross-gcc/target # This is the prefix dir
>
> # The following dirs are from where I call configure and make
> /usr/local/cross-gcc/build/{binutils,gcc,gdb,newlib}
>
> Then I built binutils-2.9.5.0.24:
>
> cd /usr/local/cross-gcc/src

I assume you mean /usr/local/cross-gcc/build/binutils.  One configures and builds
in the "build" directory, not the source directory.

> target=powerpc-eabi
> prefix=/usr/local/cross-gcc/target
> cd /usr/local/cross-gcc/build/binutils
> ../../src/binutils-2.9.5.0.24/configure --target=$target
> --prefix=$prefix -v
> make all install
>
> binutils built just fine.
>
> Then I try to build gcc-2.95.2:
>
> cd /usr/local/cross-gcc/src/gcc-2.95.2
>
> Following the advice of an article by Bill Gatliff on www.embedded.com I
> did
> this:
> rm -rf libf2c
> ln -s ../newlib-1.8.2/newlib newlib
>
> Then off to my build dir:
> cd /usr/local/cross-gcc/build/gcc
> ../../src/gcc-2.95.2/configure --target=$target --prefix=$prefix
> --with-newlib \
> --with-headers=/usr/local/cross-gcc/src/newlib-1.8.2/newlib/libc/include
> \
> --with-cpu=860 -v
>
> make cross LANGUAGES="c c++" install

Note that the LANGUAGES= notation is no longer supported for gcc-2.95.x.  You no
longer have to remove the libf2c directory.  The language options are taken care
of by the configure option --enable-languages.  eg. --enable-languages="c,c++".

Just type "make" or "make cross".


> _muldi3
> as: unrecognized option `-ppc'
> make[3]: *** [libgcc2.a] Error 1
> make[3]: Leaving directory `/usr/local/cross-gcc/build/gcc/gcc'
> make[2]: *** [stmp-multilib-sub] Error 2
> make[2]: Leaving directory `/usr/local/cross-gcc/build/gcc/gcc'
> make[1]: *** [stmp-multilib] Error 1
> make[1]: Leaving directory `/usr/local/cross-gcc/build/gcc/gcc'
> make: *** [cross] Error 2

The new compiler is picking up the native assembler.  You need to have the
installed cross-binutils in your path.
Try "export PATH=/usr/local/cross-gcc/target/bin:$PATH" to prepend the path.

Regards,
Brendan Simon.



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


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