This is the mail archive of the gcc@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]

cross-compiler for PowerPC from i386 Linux


I suspect this is a common question, but I don't know where to look for 
the answer.

I'm having trouble creating a cross-compiler. The host platform is 
RedHat 7.2 (x86), and I want to build a compiler for PowerPC Linux. (I 
eventually need to cross-compile the Linux kernel as part of an activity 
to boot an old PowerPC platform.) While attempting to do this, I run 
into several problems.

First, the include file gcc/comfig/rs6000/linux.h tries to include 
<signal.h> and <sys/ucontext.h>. These files exist in /usr/include, of 
course, but that isn't part of the include path. Adding it to the 
include path makes other things fail (as I would expect). I managed to 
hack past this problem by surrounding the last part of the file 
(including the definition of MD_FALLBACK_FRAME_STATE_FOR) with an #if 0 
/ #endif pair.

Second, it never builds crti.o, but it wants this file to create libgcc 
 When I tried to fake this up, the loader complained that it couldn't 
find -lc  I don't understand why it would want that library just to 
build libgcc, and in any event I can't cross-compile libc. until I have 
a cross-compiler.

I ran into this problem with 3.0.2, downloaded 3.0.3, and have the same 
trouble. Is there some configuration setting I'm missing? I'm specifying 
--host=i686-pc-linux-gnu --prefix=/usr/ppc --exec-prefix=/usr/ppc 
--target=ppc-linux-gnu

Thanks.

--John Bruner


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