[Top] [All Lists]

Re: DECstation testing (was DECstation status)

Subject: Re: DECstation testing (was DECstation status)
From: Warner Losh <>
Date: Wed, 04 Oct 1995 10:13:38 -0600
In-reply-to: Your message of Wed, 04 Oct 1995 12:03:08 EDT
: Regarding cross-compiling in general, I had some rather outstanding luck in
: compiling hello.c with gcc-2.7.0 on my DEC3100 compiled for a
: (compiler-less) Sparc-10 running Solaris 2.3.  I ftp'd the .S assembly
: files to the Sparc-10, assembled and linked them under solaris, and the
: damn thing worked (it core dumped the first time, but I linked in a couple
: of required .o files and shazam...)!  The instructions for cross compiling
: that came with gcc-2.7.0 were pretty good.  The whole point became moot
: though, once I found where to get a gcc binary image for Solaris2.3, and
: then boot-strapped gcc-2.7.0.

One thing in the cross compiling instructions that either was missing,
or that you might not have followed was the need to create the as, ld,
et al programs from the binutils distribution targeted at the host
platform.  Once you do that, cross compiling becomes *MUCH* easier.

I've sent this out a couple of times, but to create a cross compiler
(following the gnu rules), you basically need to do the following:

        1) grab binutils.  configure --target cpu-system_mfg-os.  make
           then make install.  May need --root or something like that
           if you don't control /usr/local
        2) Grab the includes and libs from the target machine, place
           them in /usr/local/cpu-system_mfg-os/{lib,include}.
        3) grab gcc. configure --target cpu-system_mfg-os.  make then
           make install.

To build programs for the target, then add -b cpu-system_mfg-os to
your compilation line.  With this method, you  can have multiple cross
compilers on one system.

This differs slightly from the cross compilers that the MIPS Linux
folks have produced, but it is close enough should you need to do this
in the future.


<Prev in Thread] Current Thread [Next in Thread>