avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard


From: Georg-Johann Lay
Subject: Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2
Date: Mon, 10 Oct 2011 14:39:37 +0200
User-agent: Thunderbird 2.0.0.24 (X11/20100302)

Jens Bauer schrieb:
> Hi all,
> 
> I'm trying to compile avr-gcc-4.5.3 and avr-gcc-4.6.1 on Mac OS X 10.5.8 
> (PPC).
> My version of the native gcc is 4.2.1; I use this compiler, since gcc-4.0 can 
> not compile GMP/MPFR/MPC.
> 
> I can successfully build these versions:
>     4.2.4
>     4.3.0
>     4.3.4
>     4.4.4
> 
> The following versions fail (with exactly the same build script as the above 
> versions):
>     4.5.0
>     4.5.2
>     4.5.3
>     4.6.0
>     4.6.1
> 
> As you already know, gcc > 4.3.x requires GMP, so I can successfully build 
> several versions of GCC with GMP/MPFR/MPC.
> 
> I've not applied any patches yet, and it does not matter at all whether or 
> not I build the GMP/MPFR/MPC libraries.
> 
> Here's my configure line and various interesting information:
> 
> SOURCEDIR="/Users/toolchain/avr-toolchain/source/gcc-4.5.3"
> BUILDDIR="/Users/toolchain/avr-toolchain/Build/gcc-4.5.3"
> 
>     
> WITH="--with-gmp=/Users/toolchain/avr-toolchain/packages/gmp/usr/local/myPkg 
> --with-mpfr=/Users/toolchain/avr-toolchain/packages/mpfr/usr/local/myPkg 
> --with-mpc=/Users/toolchain/avr-toolchain/packages/mpc/usr/local/myPkg"
>     PREFIX="/Users/toolchain/avr-toolchain/packages/gcc/usr/local/myPkg"
>     WITH_LOCAL_PREFIX="--with-local-prefix=$PREFIX"
>     TARGET=avr
> 
>     $SOURCEDIR/$GCC/configure --quiet --program-prefix=avr- --target=$TARGET 
> --prefix=$PREFIX ${WITH} $WITH_LOCAL_PREFIX --disable-nls --disable-shared 
> --disable-threads --disable-libssp --with-gcc --with-gnu-ld --with-gnu-as 
> --with-dwarf2 --enable-languages=c,c++
>     make
>     make install
> 
> I've tried the following before compiling, but it makes no difference:
> ln -s "$BUILDDIR/gmp-$GMP_VERSION" "$BUILDDIR/gcc-$GCC_VERSION/gmp"
> ln -s "$BUILDDIR/mpfr-$MPFR_VERSION" "$BUILDDIR/gcc-$GCC_VERSION/mpfr"
> ln -s "$BUILDDIR/mpc-$MPC_VERSION" "$BUILDDIR/gcc-$GCC_VERSION/mpc"

Don't do that.

Completely remove you $BUILD directory, copy or soft-link gmp/mpc/mpfr into
toplevel GCC $SOURCE directory and try to re-configure and re-build again.

That way the toplevel GCC configure machinery is used to configure/build
GMP/MPFR/MPC for your host/build setup.

Johann

> And finally, here's where the build stops:
> 
> ---8<-----8<-----8<-----
> 
> checking ABI=32
> using ABI="32"
>       CC="gcc -m32 -std=gnu99"
>       CFLAGS="-O2 -pedantic -mpowerpc -no-cpp-precomp -force_cpusubtype_ALL 
> -mtune=970"
>       CPPFLAGS=""
>       MPN_PATH=" powerpc32 generic"
> creating config.m4
> ...
> ...
> libtool: link: ( cd ".libs" && rm -f "libgmp.la" && ln -s "../libgmp.la" 
> "libgmp.la" )
> make[2]: Nothing to be done for `all'.
> mkdir ./mpfr
> Configuring in ./mpfr
> configure: error: --target is not appropriate for GMP
> Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system
> explicitly.  Use --host if cross-compiling (see "Installing GMP" in the
> manual for more on this).
> make[1]: *** [configure-mpfr] Error 1
> make: *** [all] Error 2
> 
> --->8----->8----->8-----
> 
> I've spent the last many weeks using Google, however, I didn't find a 
> solution to this problem.
> I believe that the way gcc is built have changed from version 4.4.4 to 
> version 4.5.0.
> If you need any further information, let me know and I'll try my best to 
> provide it.
> 
> Can anyone tell me what I am missing / doing wrong ?
> 
> Love,
> Jens
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]