🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++
Article #206

Installation of G++ 1.36- on 386 running SYS V 3.0

#206
From: John Willis
Date: Mon, 30 Oct 1989 18:13
53 lines
3050 bytes
The following changes were required to enable compilation of a partially
functional g++ version 1.36-, under System 5, rev 3, on a 386.  The 
resulting binary appears to work except for linkage.  Descriptions are 
probably more useful than diffs as there have been several trial releases 
on labrea.stanford in the last few weeks.

1) symbolic links are used in the maketest target of the Makefile.
   Since SVSV generally does not support ln -s, the -s should be a 
   define variable in the upper section of the Makefile.
2) toplev.c needs to include /usr/include/sys/fcntl.h to define
   O_RDONLY.
3) For SVID, the third argument to lseek should be SEEK_SET instead of
   L_SET and SEEK_END should replace L_XTND.
4) The file name cplus-typeck2.c exceeds SVID file name length limits.
   I suggest using something like cplus-type2.c and editing makefile
   accordingly.
5) In cplus_lex.c, SVID uses strrchar() instead of rindex()
6) GNU malloc was used to get around problems with the system malloc
   supplied by Microport, your results may vary with other ports.
7) When testing under target crt0+.o for i386gas+ in the Makefile, 
   config/ should be added to the path.

Libg++ also needed a few changes...
8) In libg++/src/File.cc the include of sys/file.h must be preceeded
   by sys/types.h
9) In libg++/g++-include/sys/file.h we must also include 
   //usr/include/sys/fcntl.h as in the SUN case.
10) In libg++/src/streambuf.cc the include of sys/file.h must be 
    preceeded by sys/types.h
11) In std.h, bzero(), bcopy(), bcmp(), and index() should not be
    defined as functions if they are later defined as macros in
    the USG case.
12) In regex.cc, only define bzero(), bcopy(), and bcmp() if USG 
    is defined and std.h is not included.
13) In std.h don't define index as a macro since it will mess up 
    overloaded uses of index() such as the String class.

Linking is still not happening properly.  Using COFF encapsulation
and newld, some symbols from libraries related to the two static
chains were not linked properly (___xyzzy__, ___CTOR_LIST_, and
___DTOR_LIST__).  Defining USE_COLLECT for gcc.c did not work 
since no path seemed to define linker_was_run before 
do_spec(collect_spec).  Obviously collect also needs to be built
and (manually) installed once g++ knows how to call it.  Has anyone
already tracked the problem down?

-John

BTW: g++, version 1.35.1, functions well on the 80386.  A Sun
3/260 also used to develop and test a large compiler written in
g++ takes almost twice as long to do the compile, and the
resulting binary is almost always slower on the SUN 3.  The
80386 port is worthwhile.
Technical Details
Message-ID: <6752@pt.cs.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pt.cs.cmu.edu!h.gp.cs.cmu.edu!jxw

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pt.cs.cmu.edu!h.gp.cs.cmu.edu!jxw
From: jxw@h.gp.cs.cmu.edu (John Willis)
Newsgroups: gnu.g++
Subject: Installation of G++ 1.36- on 386 running SYS V 3.0
Message-ID: <6752@pt.cs.cmu.edu>
Date: 30 Oct 89 18:13:04 GMT
Organization: Carnegie-Mellon University, CS/RI
Lines: 53