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]

Re: Cross Compile Gcc


Hi, Sorry for the delay in replaying,

You were right if I do sudo I have to export again. I did a sudo bash at the begining and I did not  used sudo again. Now the problem is new...

checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
make[1]: *** [configure-target-libmudflap] Error 1
make[1]: Leaving directory `/home/idipous/powerpc/build_gcc'
make: *** [all] Error 2

and for that matter I checked config.log and  I saw this:

configure:2320:17: error: gmp.h: No such file or directory
configure: In function 'main':
configure:2324: error: 'choke' undeclared (first use in this function)
configure:2324: error: (Each undeclared identifier is reported only once
configure:2324: error: for each function it appears in.)
configure:2324: error: expected ';' before 'me'
configure: failed program was:
#line 2319 "configure"
#include "confdefs.h"
#include "gmp.h"
int main() {

#if __GNU_MP_VERSION < 3
choke me
#endif

why is this?

any help?



I do not want to build for an Ubuntu powerpc. It is for a university
essay (in order to get my diploma)  and I have an embedded powerpc
having Linux 2.2.0. 

I think at a later point I will have to download the kernel 2.2.0 and use its headers.  

This is a part of what I intend to do but so far I was not  able to make the cross compile. 

----- Original Message ----
From: Kai Ruottu <karuottu@mbnet.fi>
To: none none <menwn@yahoo.co.uk>
Cc: gcc-help@gcc.gnu.org
Sent: Wednesday, 9 May, 2007 8:07:25 PM
Subject: Re: Cross Compile Gcc

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.







	
	
		
___________________________________________________________ 
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 


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