Anyone have experience building gcc as cross compiler?

Anyone have experience building gcc as cross compiler?

Post by Jon Gordo » Fri, 18 Feb 2000 04:00:00



I already posted this to gnu.help.gcc, but no one answered.  Even
though this is not exactly on topic, I hope someone here might be able
to help me out.

As a step towards porting to PPC linux a compiler that uses gcc as a
back end, I'm trying to build gcc-2.8.1 as a cross-compiler from i386
gnu-linux to PowerPC gnu-linux.  I downloaded and installed GNU
binutils, also version 2.8.1, and installation for cross-development
seemed to work.

The gcc configure script seemed to work, but the process fails when I
try to use make.  I get to the line in the script:

./xfgcc -B./ -D_CROSS_COMPILE -DIN_GCC    -g -I./include  -I.
-I/.config -g0 \
  -finhibit-size-directive -fno-inline-functions -fno-exceptions
-msdata=none \
  -c ./crtstuff.c -DCRT_BEGIN -o crtbegin.o

This command fails with the messages:

as: unrecognized option `-ppc'
make: *** [crtbegin.o] Error 1

Now, I have tried assembling PowerPC source on the cross-assembler
("as") that binutils ostensibly installed, and it seems to work.  (That
is, it gives no error messages and produces a.out, but I haven't tried
linking or running the output file.)  But when I give that version of
as the option "-ppc" on the command line, it fails, too.

What's going on?  Is there a configuration file I can tweak so that
this option is no longer passed to as?  Am I mistaken in thinking as
can assemble PowerPC source?

Thanks for any help,

   -Jon

 
 
 

1. Anyone Built a GCC Cross-Compiler?

I am attempting to build a GCC cross-compiler on my linux box
to produce Sun4.1x code.

I am running kernel 1.3.29

I have followed the directions exactly as specified in the GCC installation
Documentation for building a cross compiler, basically doing a:

configure --target=sparc-sun-sunos4.1

then a make LANGUAGES="c"

everything compiles fine for a while, and then I start getting Assembler
errors about undefined assembler codes, and such.

Has anyone successfully built a cross compiler (specifically SunOS-4.1)

If so, could you point me in the proper direction for further documentation
or procedures..

thanks

--
Marauder, The              ||"Maybe going camping might provide a badly
LoD Communications, Inc.   || needed  dose of  perspective?  The radiation

___________________________||   [Circa 1994 - Universe aka ANI-Failure]

2. Apache server as a proxy

3. gcc error while building a linux-x-djgpp cross compiler

4. 68hc11 assembler

5. "invalid option" error while building gcc as a cross-compiler

6. Bonding and arp monitoring

7. how to build gcc 2.95.3 cross compiler

8. login process remaining after loggin in

9. gcc "make error" when building a linux-x-djgpp cross compiler

10. building a gcc cross compiler

11. GCC cross compiler build troubles ...

12. egcs Warning while building gcc-2.8.1 cross compiler

13. Building GCC as Solaris2.4 -> SunOS4.1.3 cross-compiler