Article View: gnu.gcc.help
Article #52636gcc2.2.2 for 386BSD,success?
From: Othman Ahmad
Date: Thu, 18 Jun 1992 10:24
Date: Thu, 18 Jun 1992 10:24
72 lines
3741 bytes
3741 bytes
I have successfully compiled gcc-2.2.2 into stage1 and dhryston.c v1.1 with the following performances. I am now compiling into stage2. I had some problems which I solved ad hoc. Basically it is just to remove compile errors. The basic steps are roughly, cp tm-386b.h from gcc1.39 to config, edit tm-386b.h to include i386bsd.h and delete the tm-i386.h. edit configure to include entry for i386-386bsd-bsd which is just a copy of the generic i386-*-bsd. The main problems tha I had was: gvarargs and gstdarg.h do not work. Must use host compiler. omehow va_list is not defined anywhere in gvarargs. Note that the installation program actually copies gvarargs and gstdargs to libdir/varargs.h and stdargs.h.In making stage1, must replace them with original compiler(gcc1.39) headers. gstddef.h does not include size_t typedef which is just unsigned int. Comment out size_t in gstdef.h. Use those that come with stdio.h. In sys-types.h requires size_t which is supposed to be supplied by gstddef, but I have commented out that type definition. Including stdio.h caused a lot of errors, because __STDC__ is not defined by gcc 2.2.2 in making stage1. My solution was to enter typedef unsigned int size_t; manually. In obstack.h statement #if __GNUC__ < 2 not recognised even by cpp v 2.2.2, must handle manually. The __extension is defined if using gcc v 1.39. enquire cannot originally be compiled reliable when compiling gcc 2.2.2 using gcc 1.39 but just proceed to installation. In the making of stage1, enquire can be compiled easily, but got errors in float.h but still do not understand how because the values are what are expected. Maybe sscanf cannot scan the float numbers. As I had suspected, the problems which I had with gcc 2.1 was in faulty i386.md . The gcc 2.2.2 fixed that problem so I can use -O and -O2 optimization. Strangely the -O2 option is not as fast as -O, so when making stage1 and stage2 I use -O option. Since I still do not have a debugger available for 386bsd, I hope someonw can explain to me the reasons for all the problems so that we can develop a better installation methods for gcc 2.XX. The the making of the original gcc 2.2.2 using gcc 1.39 i just use CFLAGS= -g -v -DPOSIX to force the use of unistd.h header. No optimization was used. The results of the compilations are: rg386bsd#dhry.139 before ProcDhrystone(1.1) time for 500000 passes = 47 This machine benchmarks at 10638 dhrystones/second rg386bsd#dhry.222-O before ProcDhrystone(1.1) time for 500000 passes = 37 This machine benchmarks at 13513 dhrystones/second rg386bsd#dhry.222-O2 before ProcDhrystone(1.1) time for 500000 passes = 38 This machine benchmarks at 13157 dhrystones/second rg386bsd# The use of the gcc 2.2.2 compiled by gcc 1.39 is not proven but is O.K. The stage1 and stage2 should allow us to have a faster compiler but not fast executables, and is somehow verified, after having able to compile a C compiler. However floating point routines are not verified. -- Othman bin Ahmad, School of EEE, Nanyang Technological University, Singapore 2263. Internet Email: eoahmad@ntuix.ntu.ac.sg Bitnet Email: eoahmad@ntuvax.bitnet
Technical Details
Message-ID:
<1992Jun18.102431.23045@ntuix.ntu.ac.sg>Path:
arc1-ca.pugleaf.net!sparky!uunet!darwin.sura.net!jvnc.net!nuscc!ntuix!eoahmadShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,b1c8a643ed755afc,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1992-06-17 23:02:22 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!sparky!uunet!darwin.sura.net!jvnc.net!nuscc!ntuix!eoahmad From: eoahmad@ntuix.ntu.ac.sg (Othman Ahmad) Subject: gcc2.2.2 for 386BSD,success? Message-ID: <1992Jun18.102431.23045@ntuix.ntu.ac.sg> Organization: Nanyang Technological University - Singapore Date: Thu, 18 Jun 1992 10:24:31 GMT Lines: 73