🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52868

cross compiling gcc to run on another machine

#52868
From: Dan Stromberg
Date: Mon, 18 May 1992 19:21
32 lines
2028 bytes
Building a cross compiler wasn't *too* hard, after someone pointed out
the magic directory in which to place an as and ld.

I'm pretty happy being able to cross compile from a sparc to a slow rt, but
it would be nice to have gcc running on the rt itself as well.

gcc didn't compile on the rt with high C or pcc, so naturally, I'd like
to cross compile gcc for the rt.

I tried the "for-bootstrap" and "bootstrap" targets, as well as creating
a stage2 with the cross compiler, but none of these worked.

The problem is, gcc likes to build binaries, with which to generate some
of its own header files and such.  So it tries to build its header files
with an rt binary!  I tried just running one of the binaries
on an RT to get the header file and continue, and this would probably
work if I put the (tedious) time into it.  But surely someone has worked
out a better way(?).

I searched the entire gcc 2.1 source distribution for the (case insensitive)
string "boot", but found nothing that looked very relevant to my difficulty.
In fact, there was Very little mention of recompiling the compiler with
a cross compiler.

Any pointers?

(In case it matters, I'm *not* using binutils or gas - they didn't seem
to support the rt, so I've used the as and ld from the Mt Xinu Mach source
distribution - but that's probably not the problem, since cross compilation
seems to work - although the optimizer did blow up once, on agrep)

- Dan
Technical Details
Message-ID: <1992May18.192122.21796@uceng.UC.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!mips!mips!sdd.hp.com!news.cs.indiana.edu!uceng.uc.edu!strombrg

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,44ba36df3ee1b7ce,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-05-18 10:59:22 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!mips!mips!sdd.hp.com!news.cs.indiana.edu!uceng.uc.edu!strombrg
From: strombrg@uceng.UC.EDU (Dan Stromberg)
Subject: cross compiling gcc to run on another machine
Message-ID: <1992May18.192122.21796@uceng.UC.EDU>
Organization: College of Engineering, University of Cincinnati
Date: Mon, 18 May 1992 19:21:22 GMT
Lines: 33