Re: Cross Compile Gcc

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

 



none none wrote:

> 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
>
> and then I export the path with the command:
> export PATH=$PATH:/opt/powerpc/bin

What will be told if you simply  write:

      sudo powerpc-linux-ar --version

as a command? Is the command found or not after first using the 'export' for redefining PATH?

Usually the $prefix/bin will be puts into the PATH definitions in the startup-scripts so when opening a new terminal session the PATH is right and includes ALL the required search places...

> 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

The 'sudo' probably starts a new shell session as 'root', reads the startup scripts for root and uses the PATH got from them... And your earlier 'export' command probably was totally vain and forgotten...

BTW, what is your goal for the $target ? Someone using Ubuntu 7.0.4/x86 or .../x86_64 could be expected to be interested to crosscompile to Ubuntu 7.0.4/PPC but your configure command clearly tells this not being the case at all! A Ubuntu/x86-X-Ubuntu/PPC cross-GCC build will succeed in only one build step, producing C/C++/Fortran/Java etc. compilers and all the shared libs
with threads support etc.


[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