balen@camscan.UUCP (henry Balen) (07/06/90)
Here are the diffs that I needed to get g++ 1.37.1 running on the sun386. A few points you should note: 1) Apply the diffs after you have gone through the atandard configuration setup ie after config.g++ etc 2) There is a /vol/local/lib.sun386 hardwired in the text below, this should be changed to where you expect to find the g++ library on your system. 3) The first test in the libg++ will *not* work, because of the object file format loading of functions at run time will not work. 4) Unfortunately your g++ programs will end up statically linked, this means that they will be larger than you need (but at least it will work. 5) The only changes needed in the libg++ directory will be to the Makefile: i) set the PWD if using Sun's make. ii) set PIPE_AS to nothing ie PIPE_AS = 6) This all works with sunOS 4.0.2 on the sun386. It appears that it will be a long long time (if ever) before there is another version of SunOS for the sun386 so the patches should stay fairly constant. cheers Henry ------------------------ | Henry Balen | Email: | CamScan | || balen@camscan.co.uk | Saxon Way | || balen%uk.co.camscan@nsfnet-relay.ac.uk | Bar Hill | || ...!mcvax!ukc!camscan!balen | Cambridge CB3 8SL | || ...!ukc!camscan.co.uk!balen | United Kingdom | ------------------------ Phone: +44 954 780926 Fax: +44 954 789829 ---------- Cut Here ----------------------------------------------- diff -rc2 Makefile- Makefile *** Makefile- Mon Feb 26 14:37:46 1990 --- Makefile Thu May 3 12:05:46 1990 *************** *** 38,42 **** # On COFF systems, use one of the definitions below. (see collect.c) ! # COFFLAGS = -DUSE_COLLECT -DCOFF # COFFLAGS = -DUSE_COLLECT -DEXTENDED_COFF --- 38,42 ---- # On COFF systems, use one of the definitions below. (see collect.c) ! COFFLAGS = -DUSE_COLLECT -DCOFF # COFFLAGS = -DUSE_COLLECT -DEXTENDED_COFF *************** *** 47,51 **** # CFLAGS = -g -DSOS -DESKIT -O ! CFLAGS = -g -DGATHER_STATISTICS -O $(COFFLAGS) -B../gcc-test/ CC = gcc BISON = bison --- 47,52 ---- # CFLAGS = -g -DSOS -DESKIT -O ! # may need -DSOS -DESKIT added ! CFLAGS = -g -DSOS -DESKIT -DGATHER_STATISTICS -O $(COFFLAGS) -B../gcc-test/ CC = gcc BISON = bison *************** *** 74,78 **** # USG_STDIO = -DUSG_STDIO ! prefix=/usr/local # Directory where sources are, from where we are. --- 75,80 ---- # USG_STDIO = -DUSG_STDIO ! #prefix=/usr/local ! prefix=/vol/local # Directory where sources are, from where we are. *************** *** 79,89 **** srcdir = . # Directory in which to put the executable for the command `g++' ! bindir = $(prefix)/bin # Directory in which to put the subprograms used by the compiler. ! libdir = $(prefix)/lib # Directory in which to put the crt0+.o, crt1+.o, and other such files. ! startdir = $(prefix)/lib # Directory in which to put man pages. ! mandir = $(prefix)/man/man1 # Number to put in man-page filename. manext = 1 --- 81,92 ---- srcdir = . # Directory in which to put the executable for the command `g++' ! bindir = $(prefix)/bin.sun386 # Directory in which to put the subprograms used by the compiler. ! libdir = $(prefix)/lib.sun386 # Directory in which to put the crt0+.o, crt1+.o, and other such files. ! startdir = $(prefix)/lib.sun386 # Directory in which to put man pages. ! #mandir = $(prefix)/man/man1 ! mandir = $(prefix)/man # Number to put in man-page filename. manext = 1 *************** *** 205,211 **** # gnulib is not a target because a proper installation of GNU CC # will place it where g++ can find it. Same with cpp ! all: crt1+.o g++ cc1plus ld++ g++filt # collect crt0+.o # On COFF systems, use the target below. ! # all: g++ cc1plus collect # crt0+.o crt1+.o doc: $(srcdir)/cpp.info $(srcdir)/g++.info --- 208,214 ---- # gnulib is not a target because a proper installation of GNU CC # will place it where g++ can find it. Same with cpp ! # all: crt1+.o g++ cc1plus g++filt ld++ # collect crt0+.o # On COFF systems, use the target below. ! all: g++ cc1plus collect crt0+.o crt1+.o doc: $(srcdir)/cpp.info $(srcdir)/g++.info *************** *** 224,227 **** --- 227,231 ---- gcc.o: gcc.c $(CONFIG_H) $(CC) $(CFLAGS) $(INCLUDES) \ + -DNO_GNU_LD \ -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \ -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-\" -c \ *************** *** 287,291 **** COLLECT_OPTIONS=''; \ fi; \ ! $(CC) -o collect $(PROFILE) $$COLLECT_OPTIONS $(CFLAGS) $(INCLUDES) $< -lg -lc $$COLLECT_LIBS collect2: collect2.c config.h --- 291,296 ---- COLLECT_OPTIONS=''; \ fi; \ ! $(CC) -o collect $(PROFILE) $$COLLECT_OPTIONS $(CFLAGS) $(INCLUDES) collect.c version.o -lg -lc $$COLLECT_LIBS ! # $(CC) -o collect $(PROFILE) $$COLLECT_OPTIONS $(CFLAGS) $(INCLUDES) $< -lg -lc $$COLLECT_LIBS collect2: collect2.c config.h *************** *** 600,605 **** -if [ -f collect2 ] ; then $(INSTALL) collect2 $(libdir)/gcc-ld ;fi $(INSTALL) g++ $(bindir) ! -if [ -f ld++ ] ; then $(INSTALL) ld++ $(libdir)/gcc-ld ;fi ! # -if [ -f crt0+.o ] ; then $(INSTALL) crt0+.o $(startdir)/crt0+.o ;fi -if [ -f crt1+.o ] ; then $(INSTALL) crt1+.o $(startdir)/crt1+.o ;fi -mkdir $(libdir)/g++-include --- 605,610 ---- -if [ -f collect2 ] ; then $(INSTALL) collect2 $(libdir)/gcc-ld ;fi $(INSTALL) g++ $(bindir) ! # -if [ -f ld++ ] ; then $(INSTALL) ld++ $(libdir)/gcc-ld ;fi ! -if [ -f crt0+.o ] ; then $(INSTALL) crt0+.o $(startdir)/crt0+.o ;fi -if [ -f crt1+.o ] ; then $(INSTALL) crt1+.o $(startdir)/crt1+.o ;fi -mkdir $(libdir)/g++-include diff -rc2 config.h- config.h *** config.h- Wed Feb 22 17:26:52 1989 --- config.h Wed May 2 18:18:24 1990 *************** *** 18,21 **** --- 18,25 ---- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + /* Put in by HCB for the sun386 system -- needs no underscores + * see the collect.c file + */ + #define NO_UNDERSCORES 1 /* #defines that need visibility everywhere. */ *************** *** 43,47 **** --- 47,54 ---- #define bcmp(a,b,c) memcmp (a,b,c) + /* HCB 2 May 1990 #define LINK_SPEC "%{!e*:-e _start} -dc -dp %{g:-Bstatic}" + */ + #define LINK_SPEC "%{!e*:} -Bstatic " #ifdef __GNUC__ diff -rc2 crt0.c- crt0.c *** crt0.c- Tue Oct 24 15:25:06 1989 --- crt0.c Thu May 3 10:26:47 1990 *************** *** 474,478 **** --- 474,480 ---- #endif + #ifndef sun386 __do_global_init (); + #endif sun386 exit (main (argc, argv, environ)); } *************** *** 741,744 **** --- 743,747 ---- static int _end_crt0 (); + #ifndef COFF void __do_global_init () *************** *** 765,768 **** --- 768,772 ---- } } + #endif COFF typedef struct dtor_table_entry *************** *** 774,777 **** --- 778,782 ---- extern dtor_table_entry *__DTOR_LIST__; + #ifndef COFF void __do_global_cleanup () *************** *** 788,791 **** --- 793,797 ---- } } + #endif COFF static int *************** *** 794,797 **** --- 800,804 ---- } #else + #ifndef COFF void __do_global_init () {} *************** *** 799,801 **** --- 806,809 ---- void __do_global_cleanup () {} + #endif COFF #endif diff -rc2 gcc.c- gcc.c *** gcc.c- Sat Jan 20 12:21:10 1990 --- gcc.c Thu May 3 11:19:51 1990 *************** *** 304,312 **** "%{!c:%{!M*:%{!E:%{!S:collect -o %g.S %g.R\n\ as %g.S -o %g.O\n\ ! ld %{o*} %g.R %g.O\n\ }}}}"; /* Here is the spec for running the linker, after compiling all files. */ ! char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld -r -o %g.R %l\ %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\ %{y*} %{!nostdlib:%S} \ --- 304,317 ---- "%{!c:%{!M*:%{!E:%{!S:collect -o %g.S %g.R\n\ as %g.S -o %g.O\n\ ! ld -Bstatic -e _start %{o*} %g.R %g.O -L/vol/local/lib.sun386\n\ }}}}"; + /* ld %{o*} %g.R %g.O\n\ */ + /* Here is the spec for running the linker, after compiling all files. */ ! /* ! * char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld -r -o %g.R %l\ ! */ ! char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld -r -L/vol/local/lib.sun386 -o %g.R %l\ %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\ %{y*} %{!nostdlib:%S} \ diff -rc2 tm.h- tm.h *** tm.h- Wed May 24 20:27:55 1989 --- tm.h Wed May 2 12:57:53 1990 *************** *** 32,36 **** --- 32,39 ---- #define STARTFILE_SPEC \ + "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0+.o%s}}" + /* "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" + */ #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}\ From balen Wed Jun 27 18:58:42 1990 To: cam-sug-request@cam-cl Subject: SUG meeting Can you tell me when the next Cambridge SUG meeting due to take place? I thought that there was going to be one in June. Have I missed it? cheers Henry <balen@camscan.co.uk> From balen Thu Jun 28 09:03:11 1990 To: newsdev@uk.ac.turing Subject: Re: HyperNeWS Thanks for the HyperNeWS info. >BTW, I sent a first reply to balen@camscan.co.uk, and it bounced. This >attempt is using balen@camscan.uucp. Our sysadmin suggested that >your internet address may not be registered. Our site is NRS registered (it was regsited last Autumn), I thought that the camscan.co.uk should work (or should it be uk.co.camscan?). cheers Henry Balen. <balen@camscan.co.uk OR balen@camscan.uucp> From balen Thu Jun 28 09:04:07 1990 To: Info-Server@uk.ac.daresbury REQUEST: help From balen Thu Jun 28 11:21:27 1990 To: info-server@uk.ac.daresbury Cc: balen REQUEST: SOURCES TOPIC: /NEWS/HYPER13 REQUEST: END From balen Thu Jun 28 11:24:54 1990 To: info-server@uk.ac.daresbury Cc: balen@uk.co.camscan REQUEST: SOURCES TOPIC: /UNIXC/MISC/DUMASHAR/UUE TOPIC: /UNIXC/MISC/DUMASHAR/UUD REQUEST: END From balen Thu Jun 28 11:28:04 1990 To: info-server@ukc.ac.uk Cc: balen request: comp.sources.unix topic: volume21/index21 topic: volume22/index22