Re: Cross Compile Gcc

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

 



none none wrote:
Hi everyone,



I have this very peculiar error when I try to make gcc for cross compilation with target a powerpc on my Ubuntu 7.0.4 box. I keep getting the error:



make[2]: powerpc-linux-ar: Command not found

make[2]: *** [libgcc.a] Error 127

make[2]: Leaving directory `/opt/powerpc/build-gcc/gcc'

make[1]: *** [stmp-multilib] Error 2

make[1]: Leaving directory `/opt/powerpc/build-gcc/gcc'

make: *** [all-gcc] Error 2



The thing is that I have already build binutils 2.16 and 2.17 and I have tried with gcc 4.1.0 and 4.1.2 (and  some older versions as well, 3.3.2 etc).



I configure binutils with the command:



/home/idipous/Desktop/binutils-2.16/configure --target=powerpc-linux --prefix=/opt/powerpc


and


sudo make all install



and then I export  the path with the command:



export PATH=$PATH:/opt/powerpc/bin



I configure gcc with the command:



sudo /home/idipous/Desktop/gcc-4.1.0/configure --target=powerpc-linux --prefix=/opt/powerpc/ --disable-shared --disable-threads --enable-languages=c --with-newlib


and then


sudo make all-gcc install-gcc



This error I expected to have it in case I forgot to export the path in which the powerpc-linux-ar was in. But this is in the /opt/powerpc/bin.



It is driving me nuts. With older versions of gcc I have the same error with powerpc-linux-ranlib.



Any ideas?


Well you say your target is powerpc-linux, but you also say --with-newlib. Is that really correct? I do similar mips builds all the time without problem, but I also specify --with-sysroot= so that the system libraries and header files are found.

If you are trying to bootstrap a toolchain, you might give Crosstool a try. It takes care of specifying all the fiddly options needed to bootstrap a toolchain.

David Daney

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux