dfreuden@fis1004.shearson.com (David G Freudenstein) (03/22/91)
Apologies in advance if this is a FAQ, but i haven't seemed to locate FAQ/Answers for either gnu.gcc.help or comp.sys.intel, yet. My question has 2 parts: 1. VANILLA question: HOW does one create a cross-compiler from machine a to machine b, in what (i hope :-) is the simplest possible case, i.e. i'm happy to keep using the EXISTING cross-assembler and cross-linker, but wish merely to invoke GCC for the compiler phases which turn C-source into Assembler? 2. Non-Vanilla question: (pending the answer to question #1) SPECIFICALLY for --==> sparc <==-- cross-compilation of object/executable code to be run on the --==> i860 <==-- what must be done that is not in the gcc distributed documentation (i have version 1.39 from prep)? Once again, just for clarity: I am not even trying to replace the existing assembler/linker, just the {C source} --==> {i860 assembler} phase (although admittedly, i wouldn't mind finding out how to bring up gas and/or gnu ld for the later compilation phases as well, if I succeed with getting gcc to work for the "C2assembler" part). Thanks very much david freudenstein
tmh@prosun.first.gmd.de (Thomas Hoberg) (03/28/91)
In article <DFREUDEN.91Mar21164037@fis1004.shearson.com>, dfreuden@fis1004.shearson.com (David G Freudenstein) writes: |> |> Apologies in advance if this is a FAQ, but i haven't seemed to locate |> FAQ/Answers for either gnu.gcc.help or comp.sys.intel, yet. |> |> My question has 2 parts: |> |> 1. VANILLA question: |> |> HOW does one create a cross-compiler from machine a to machine b, in |> what (i hope :-) is the simplest possible case, i.e. i'm happy to keep using |> the EXISTING cross-assembler and cross-linker, but wish merely to invoke GCC |> for the compiler phases which turn C-source into Assembler? |> |> 2. Non-Vanilla question: (pending the answer to question #1) |> |> SPECIFICALLY for |> --==> sparc <==-- |> cross-compilation of object/executable code to be run on the |> --==> i860 <==-- |> what must be done that is not in the gcc distributed documentation (i have |> version 1.39 from prep)? |> |> Once again, just for clarity: |> |> I am not even trying to replace the existing assembler/linker, just the |> {C source} --==> {i860 assembler} |> phase (although admittedly, i wouldn't mind finding out how to bring up gas |> and/or gnu ld for the later compilation phases as well, if I succeed with |> getting gcc to work for the "C2assembler" part). |> |> Thanks very much |> |> david freudenstein Well I compiled GCC for sparc to MC680[23]0 compilation. I just said that I wanted a GCC for the Motorola 'config.gcc sun3' and said 'make'. Ok, I *did* edit config.h to change the EXEC and LIBRARY prefixes, but that was it for the compiler and pretty much for the assembler. BTW. I used the Sparc compiler to translate GCC, it still produces the faster code for the Sparc. The linker caused problems because some fields in the Motorola object files could not be accessed on a Sparc due to alignment problems. I linked on the Sun-3 instead. I used this cross compiler to compile the X distribution for a Multi-Media workstation we are building here (yes it uses a plain MC68030, but it has a 34020, too and plenty of dedicated processors and hardware). I haven't tried the i860 compiler yet on some of our hardware, but the generated code is bound to be pretty bad. On a MIPS machine GCC generates code that is about twice as slow as the native compiler. I expect worse from GCC for the i860. It's not really up to RISC yet, and I don't know whether it can get there without a basic redesign. -- tom ---- Thomas M. Hoberg | UUCP: tmh@bigfoot.first.gmd.de or tmh%gmdtub@tub.UUCP c/o GMD Berlin | ...!unido!tub!gmdtub!tmh (Europe) or D-1000 Berlin 12 | ...!unido!tub!tmh Hardenbergplatz 2 | ...!pyramid!tub!tmh (World) Germany | BITNET: tmh%DB0TUI6.BITNET@DB0TUI11 or +49-30-254 99 160 | tmh@tub.BITNET