Subject: Re: Cross-compiling?
To: Mason Loring Bliss <mason@acheron.middleboro.ma.us>
From: Andreas Brusinsky <brusinsk@ibdr.inf.tu-dresden.de>
List: netbsd-help
Date: 09/13/1997 16:54:17
You have to build crosscompiling tools, i.e. specifying 
a target you want    to the configure script of binutils(as,ld.prof ..) 
and to the compiler (gcc probably).

If these tools build then you can attempt to make things for the other 
plattform. 

Example:
/* either go into the binutils directory or make a new dir and call a 
 'remote' configure script*/

 cd <new binutils build directory>; 
 <path to binutils configure script>/configure --target=i386 (or Mac).

/*This should generate all references to the sources. Then 'make' and see 
  how it goes. After that you could have a set of usefull binutils named 
  with the target architecture. Install them in an appropriate place */

Then make a gcc for that platform in a similar way.

After that typical source with a configure script can be compiled to 
the target architecture by specifying the --target= option.
Small .c files could be translated directly with the compiler.

If your local binutils don't do the job you can download binutils-2.8.1 
from GNU. But certainly this is GPL software.

        Bye   Brusi

            by           E-Mail: ab2@inf.tu-dresden.de
                         Tel.-priv: 0351-8499347 (Germany/Dresden)
          \____

On Sat, 13 Sep 1997, Mason Loring Bliss wrote:

> I was wondering... I'm trying to install NetBSD-current/i386 on a machine,
> and I'm having problems. One tool that would *really* help is cksum, but I
> can't find a cksum binary anywhere.
> 
> Is there any way I can compile for i386 on my Mac, running -current? Giving
> the compiler -m386 xor -m486 gives me the error message:
> 
> cc1: Invalid option `386'
> *** Error code 1
> 
> Stop.
> 
> Looking through the man page, these simply aren't defined under NetBSD/mac68k.
> 
> I'd love to be able to cross-compile for the i386 machine, and, conversely
> and perhaps perversely, I'd like to do the reverse once I've got the thing
> set up.
> 
> Suggestions will be greeted warmly! (Suggestions as to where I can get an
> i386 binary of cksum will be greeted with equal enthusiasm!)
> 
> --
>         Mason Loring Bliss    /\    mason@acheron.middleboro.ma.us
>      www.webtrek.com/mason   /()\   awake ? sleep() : dream();
> <barbaric>YAWP!</barbaric>  /    \  Squeak to me of love!
> 
> 
>