*BSD News Article 7895


Return to BSD News archive

Path: sserve!manuel.anu.edu.au!munnari.oz.au!sgiblab!darwin.sura.net!gatech!rutgers!cmcl2!prism.poly.edu!kapela
From: kapela@prism.poly.edu (Theodore S. Kapela)
Newsgroups: comp.unix.bsd
Subject: Re: [386BSD] GCC 2.3.1 and kernel
Keywords: 386BSD GCC kernel
Message-ID: <1992Nov16.131930.3414@prism.poly.edu>
Date: 16 Nov 92 13:19:30 GMT
References: <1992Nov11.141408.167@dde.dk>
Organization: Polytechnic University, New York
Lines: 29

In article <1992Nov11.141408.167@dde.dk> kim@dde.dk (Kim Andersen) writes:
>I finally got GCC 2.3.1 compiled (takes some time on a 4Mb machine).
>
>Tried compiling the kernel.

>Error when linking: symbol ___main undefined in init_main.
>    (I guess this symbol comes from libgcc2)
>Removed this undefined symbol in assembler input file.
>

I compiled init_main.c with the old (1.39) cc.  ___main does indeed
come from libgcc2.  A call to ___main() (__main() in libgcc2.c) is placed into
any main() routines gcc 2.x.x finds (Had the same problem with 2.2.2) during
compilation.

Also - DO KEEP YOUR ORIGINAL WORKING KERNEL AROUND.  The easiest place to
leave it is /386bsd.alt.  This way, if you have problems with the old 
kernel, you can just hit a key (okay, maybe you need to do it a few times)
to get the bootstrap loader to look for alternate kernels.  If I remember
correctly (from wdboot.c), the order is:

/386bsd /386bsd.alt /386bsd.old /vmunix /boot


-- 
...............................................................................
 Theodore S. Kapela				kapela@poly.edu
 Center for Applied Large-Scale Computing	
 Polytechnic University