Newsgroups: comp.os.minix
Path: bunyip.cc.uq.edu.au!news1.optus.net.au!optus!newsfeed.media.kyoto-u.ac.jp!news.stealth.net!63.208.208.143.MISMATCH!feed2.onemain.com!feed1.onemain.com!feed1.newsreader.com!feed2.newsreader.com!uunet!ash.uu.net!xyzzy!nntp
From: Paul Allen <paul.l.allen@boeing.com>
Subject: Re: compiling the code
X-Nntp-Posting-Host: puffin.rt.cs.boeing.com
Content-Type: text/plain; charset=us-ascii
Message-ID: <3BB29621.22D2BA44@boeing.com>
Sender: nntp@news.boeing.com (Boeing NNTP News Access)
Content-Transfer-Encoding: 7bit
Organization: The Boeing Company
X-Accept-Language: en
References: <c9bec907.0109110153.1b05d0a@posting.google.com> <3B9DFB96.FD8156B1@mail.com>
Mime-Version: 1.0
Date: Thu, 27 Sep 2001 02:59:45 GMT
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.6 sun4u)
Lines: 53
Xref: bunyip.cc.uq.edu.au comp.os.minix:37615
X-Cache: nntpcache 1.0.7.1 (see ftp://suburbia.net/pub/nntpcache)

Rene Herman wrote:
> 
> Peter Ahlgren wrote:
> 
> > I'm pretty new to the minix-thing. I'm having an 486 with
> > Minix 2.0, and a larger machine with Win2K. Can I compile
> > minix source code with Borland C++ 5.0 on the win2K-machine?
> 
> No. DOS/Windows object files and executables have a different format
> than MINIX object files and executables, so even if you could get some
> stuff to *compile*, the output from both compiler and linker would be
> useless.

The Borland compiler would have trouble because it's inextricably 
intertwined with Windows.  At least that was the case with the 3.0
version
I mistakenly bought a long time ago.

The idea of compiling on a faster machine has merit, however.  I once
upon a time rigged up a version of gcc 1.something on an Ultrix VAX to
generate object code for a 386 and used it to cross-compile Minix. 
Built
the libraries first, then compiled and linked the rest.  The VAX and the
386 have the same byte-sex, and they used similar a.out formats, so it
worked out pretty neat.  This was before the days when gcc supported
cross-compilation, so it was quite a bit of fun.  As I recall, the
trickiest
part was converting the assembler stuff from Intel syntax to AT&T.  (Or
was it the other way around?)

> > If not...what should I use ?
> 
> MINIX. It includes a C compiler (driven by the command "cc"), a "make"
> utility and everything else that's required. Seeing as how in the
> subject you say *the* code, I take it that you want to compile the MINIX
> sources (kernel sources and command sources) themselves. To do this,
> login as "bin", which will put you in /usr/src. The Makefile present
> there can be used to compile all commands. Type "make" for a short usage
> message ("make world" to build and install everything) and cd to the
> "tools" directory, and type "make hdboot" to build and install a new
> kernel. Edit /usr/include/minix/config.h first, referring to the
> config(8) manpage for details: "man config".

Or, dual-boot the fast machine with Linux and use gcc to build Minix.
Whether this makes sense depends on how much faster the machine is and
on how much you like tinkering with compilers.  :-)

Paul Allen

-- 
Boeing Phantom Works                   \ Paul L. Allen, (425) 865-3297
Math & Computing Technology              \ paul.l.allen@boeing.com
POB 3707 M/S 7L-40, Seattle, WA 98124-2207 \ Prototype Systems Group
