*BSD News Article 9400


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA5712 ; Fri, 01 Jan 93 01:53:25 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!agate!usenet.ins.cwru.edu!murphy!ljo
From: ljo@murphy.eeap.cwru.edu (L. Jonas Olsson)
Newsgroups: comp.unix.bsd
Subject: Re: gcc-2.3.2 and kernel build
Date: 29 Dec 1992 20:31:26 GMT
Organization: Case Western Reserve Univ. Cleveland, Ohio (USA)
Lines: 82
Message-ID: <1hqciuINN620@usenet.INS.CWRU.Edu>
References: <RANDY.92Dec28095652@dsndata.dsndata.com>
NNTP-Posting-Host: murphy.eeap.cwru.edu

In article <RANDY.92Dec28095652@dsndata.dsndata.com> randy@dsndata.dsndata.com (Randy Terbush) writes:
>I have sucessfully built gcc-2.3.2 on 386BSD, and have begun to use it
>to build other packages, and the kernel.

(Now gcc-2.3.3 is the latest release, and it is available in compiled
form from the directory ref.tfs.com:/usr/packages/gcc/gcc)
But it is also very easy to build yourself.

1. ./configure i386--bsd --with-gnu-ld
2. make LANGUAGES=c (the make will exit when compiling enquire.c, but
   that is the last step in the make so you can ignore it)
3. make stage1
4. make "CC=./stage1/xgcc -B./stage1/" CFLAGS="-g -O" (enquire will have
   error code 4, meaning that four values in float.h are inexact. The
   values are DBL_MIN, DBL_MAX, LDBL_MIN, and LDBL_MAX)
5. make stage2
6. make "CC=./stage2/xgcc -B./stage2/" CFLAGS="-g -O"(enquire will have
   error code 4, meaning that four values in float.h are inexact. The
   values are DBL_MIN, DBL_MAX, LDBL_MIN, and LDBL_MAX)
7. make compare
8. edit float.h to change the mantissas of DBL_MIN and DBL_MAX so
   that they end in 14 and 57 respectively. I don't know what the
   correct values for LDBL_MIN and LDBL_MAX are.
9. make install "CC=./stage2/xgcc -B./stage2/" CFLAGS="-g -O"
10. make install-libobjc "CC=./stage2/xgcc -B./stage2/" CFLAGS="-g -O"

(If you're short of disk space you have to read INSTALL)
(If you're short of RAM and/or swap space you can try to replace your
malloc routines in libc.a with the gnu malloc routines. On my system
this results in gcc and several other large programs using only
half as much data-space. For example with gcc -dm aprog.c you can
see how much data gcc is using. I don't know why the data size is
decreased and if the new malloc routines will break some other programs)

>I am tripping over many problems created by running fixincludes, and
>using the resulting include files.  What experiences are others
>having?  'fixincludes' used gnu 'sed' on my system since I have found
>some problems with the supplied 'sed'.

I think that fixincludes is not needed on 386BSD. The standard include
files is (or at least should be) ANSI C compatible. If they do need to
be fixed that should be considered a bug in 386BSD.

Also in the gcc-2.4 (that should be the next one I think) there will
a new way of fixing the include files. Now there is the fixincludes
script that is part of gcc and a complete set of new include files
that is part of libg++-2.3. In the new gcc this should be replaced
by a method to generate ANSI C and C++ compatible include files
from the system include files.

The reason that libg++-2.3 doesn't have 386BSD support is that the
changes needed to it's supplied include files are to large. Hopefully
the new gcc/libg++ (I don't know when they will be released) will
support 386BSD. (If you wish to get libg++-2.3 running you have to
get the patches from ref.tfs.com:/usr/packages/libg++/libg++)

>gcc-2.3.2 did find some slight problems in ../../isa/pccons.c with
>missing '=' in scantokey and extscantokey tables.

The remains of an attempt to compile the system, except kernel, with
gcc2 is at ref.tfs.com:/usr/386BSD_with-gcc2. The patch to ldexp.c
that is there is probably incorrect so the other patch that was
posted here recently should be used. There might also be other
problems with the patches. The patches makes it possible to compile
everything with gcc2, but some programs might be broken due to
incompatible asm() statements, gcc bugs (in either old or new compiler),
or for any other reason. One program that breaks is awk, but as this is
the GNU gawk it should perhaps be replaced by the latest version anyway.

>I will follow up with fixes as soon as I get uucp and Emacs up.
>
>-Randy
>
>Randy Terbush ------------------------------------- Design Data, Inc.
>UUCP: netcomsv!dsndata!randy ---------------------- 1033 'O' st. Suite 324
>INET: randyt@oto.unl.edu -------------------------- Lincoln, NE  68508
>--------------------------------------------------- 402-476-8278

	Jonas Olsson
	ljo@po.cwru.edu