Subject: Re: Is egcs expected to work on pmax
To: Erik Bertelsen <erik@mediator.uni-c.dk>
From: Thorsten Frueauf <s_frueau@ira.uka.de>
List: port-pmax
Date: 04/23/1998 11:46:06
Hello!

> I entered USE_EGCS=1 into mk.conf and then compiled and installed
> in .../src/gnu/usr.bin/egcs.

I did this too, and I was able to build egcs. But after installation I
was not able to build a shared library anymore. ld complained about
linking objetcts compilied with pic/PIC with objetcs that had no
pic/PIC. I was at least able to compile a working kernel, but had to
fix some warnings (look at the appended diff). I had to unpack
comp.tar.gz from 1.3 to get back a compiler which was able to build
shared libs again though, and I am now back to gcc 2.7.2.2+myc1.
I was not able to track down the problem with ld :(

Greets
      Thorsten

PS: Here are some egcs related fixes for warnings, should I commit
those?

--- snip ---
--- sys/arch/pmax/dev/tz.c-orig	Fri Apr  3 16:19:57 1998
+++ sys/arch/pmax/dev/tz.c	Wed Apr 22 15:46:02 1998
@@ -781,7 +781,7 @@
 	struct mtop *mtop;
 	struct mtget *mtget;
 	int code, count;
-	static tzops[] = {
+	static int tzops[] = {
 		SCSI_WRITE_EOF, SCSI_SPACE, SCSI_SPACE, SCSI_SPACE, SCSI_SPACE,
 		SCSI_REWIND, SCSI_REWIND, SCSI_TEST_UNIT_READY
 	};
--- sys/arch/pmax/pmax/clock.c-orig	Fri Sep  5 17:20:49 1997
+++ sys/arch/pmax/pmax/clock.c	Wed Apr 22 15:39:33 1998
@@ -110,8 +110,6 @@
 void
 cpu_initclocks()
 {
-	extern int tickadj;
-
 	if (clockfns == NULL)
 		panic("cpu_initclocks: no clock attached");
 
--- sys/arch/pmax/pmax/disksubr.c-orig	Thu Jan 16 17:31:26 1997
+++ sys/arch/pmax/pmax/disksubr.c	Wed Apr 22 15:58:20 1998
@@ -199,7 +199,7 @@
 	u_long openmask;
 	struct cpu_disklabel *osdep;
 {
-	register i;
+	register int i;
 	register struct partition *opp, *npp;
 
 	if (nlp->d_magic != DISKMAGIC || nlp->d_magic2 != DISKMAGIC ||
--- sys/arch/pmax/pmax/mainbus.c-orig	Mon Apr 20 16:09:33 1998
+++ sys/arch/pmax/pmax/mainbus.c	Wed Apr 22 16:02:24 1998
@@ -99,8 +99,6 @@
 	register struct device *mb = self;
 	struct confargs nca;
 
-	extern int ncpus;
-
 	printf("\n");
 
 	/*
--- sys/arch/pmax/ibus/ibusvar.h-orig	Mon Apr 20 16:09:31 1998
+++ sys/arch/pmax/ibus/ibusvar.h	Wed Apr 22 15:35:46 1998
@@ -11,9 +11,9 @@
  * function types for interrupt establish/diestablish
  */
 struct ibus_attach_args;
-typedef (ibus_intr_establish_t) __P((void * cookie, int level,
+typedef int (ibus_intr_establish_t) __P((void * cookie, int level,
 			int (*handler) __P((intr_arg_t)), intr_arg_t arg));
-typedef (ibus_intr_disestablish_t)  __P((struct ibus_attach_args *));
+typedef int (ibus_intr_disestablish_t) __P((struct ibus_attach_args *));
 
 
 /* 
--- sys/arch/mips/mips/trap.c-orig	Mon Mar 30 15:06:12 1998
+++ sys/arch/mips/mips/trap.c	Wed Apr 22 15:19:32 1998
@@ -1046,7 +1046,7 @@
 	/* Network software interrupt */
 	if ((mask & MIPS_SOFT_INT_MASK_1)
 	    || (netisr && (status & MIPS_SOFT_INT_MASK_1))) {
-		register isr;
+		register int isr;
 		isr = netisr; netisr = 0;	/* XXX need protect? */
 		clearsoftnet();
 #if defined(UVM)
--- snip ---