🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #712

Cross compiling problem

#712
From: Jim Lynch
Date: Sat, 26 Dec 1992 22:57
57 lines
3064 bytes
Hi, a fellow netter has sent me an inquiry which I answered to the best of my
ability; I post the inquiry here with my reply asking for more specifics.

Re:  Creating gcc on a Next that was wiped out.
Jesse Deutsch (deutsch@lagrange.Math.ColoState.EDU) asked:
>>>>>
How can one create gcc on a Next that died, was emptied
and only a part of the operating system was reinstalled from
another smaller Next?
 
We've lost manual pages and cc, among other things.
Your help is appreciated.
<<<<<
 
To which I (jimlynch@netcom.com) replied:
>>>>>
The way to do this is to build a cross compiler on some other machine. We
will call this 'other' machine the "cross host".
 
You should now configure and build GAS and LD (as well as any other tools
which operate on binaries suggested by the group) on the cross host and bring
those binaries to the cross target.
 
Once you build the cross compiler, you should test it with the hello
distribution by building it using the cross compiler, moving the resulting
binaries to the cross target (your dormant NeXT in this case) and running
the hello binary to see if it works. The reason for this is to make sure
the binaries produced by the cross compiler are in the correct format for
your machine. Once hello works, that means that the cross compiler is
producing correct code.
 
The next step is to build the compiler using the cross compiler (sounds like
double talk, don't it? :) on the cross host, again moving the resulting
binaries to the NeXT. You would only need to build the C compiler at this
point since that's the base language in which the compiler is written.
 
You should now configure and build GAS and LD (as well as any other tools
which operate on binaries suggested by the group) on the cross host and bring
those binaries to the cross target.
 
You should test this compiler by building the hello distribution and running
it (all on the cross target.)
 
If this works, you should build the stage 2 compiler. This is already well
documented. This will produce an optimised version of the compiler.
 
These are _very_ general instructions; you still need to find out how to
physically accomplish each step. For this reason, I am posting your note
along with my reply.
<<<<<
 
I ask the group: Can you be more specific than I have been? Are there any
other steps or any pitfalls to watch out for? I am asking this of people who
have built cross compilers for any machine and of people who are familiar
with the NeXT binary format.
 
-Jim "Thanks in advance" Lynch
Technical Details
Message-ID: <1992Dec26.225723.2219@netcom.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!csus.edu!netcom.com!jimlynch

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!csus.edu!netcom.com!jimlynch
From: jimlynch@netcom.com (Jim Lynch)
Subject: Cross compiling problem
Message-ID: <1992Dec26.225723.2219@netcom.com>
Followup-To: gnu.gcc.help jimlynch@netcom.com deutsch@lagrange.Math.ColoState.EDU
Summary: What's the specific process, what's the NeXT's binary format
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Sat, 26 Dec 1992 22:57:23 GMT
Lines: 57