Subject: GNU as vs DEC as for bootstrapping
To: None <port-pmax@NetBSD.ORG>
From: Marc Evans <marc@Destek.Net>
List: port-pmax
Date: 12/29/1994 13:12:27
Hi -

After several months of doing nothing on the pmax port, I have been trying to 
build a kernel. Previously, I was able to build using a combination of GNU and 
DEC tools, but this no longer appears to work. Specifically, following the 
BUILD instructions, augmenting them in some cases due to problems, I appear to 
be having problems with as. I conclude this due to the ld output when trying 
to generate the kernel.

I have the GNU binutils 2.5.2 built and installed on the target/build host. I 
also have the DEC supplied tools. When trying to use GNU "as" to generate 
locore.o and fp.o, I fail with the message:

	../../pmax/locore.S:236: Error: Unknown pseudo-op:  `.aent'
	[...]

Trying the DEC "as" results in the generation of the respective .o files, but 
when ld'ing the kernel, all of the symbols defined in those .o files are not 
resolved (i.e., bcopy). Has anyone seen this and how did you get around it?

Other more minor issues encountered include:

	- The config generated Makefile needs to be hand-tweeked to comment
	  out the AS, CC, CPP and LD command definitions so that the ones
	  defined in sys.mk are used (only needed for bootstrapping?).

	- arch/pmax/pmax/cons.c has a bug:
84c84
<       return ((*cdevsw[major(dev)].d_open)(dev, flag, mode, p));
---
>       return ((*cdevsw[major(dev)].d_open)(dev, flag, mode, p, fp));

	- arch/pmax/pmax/machdep.c has a bug:
1317c1317
< void microtime(tvp)
---
> microtime(tvp)

	- lib/libkern/Makefile.inc needed to be hacked to work with the
	  Ultrix shell(s) (only needed for bootstrap):
8c8
<       echo "xxx:\n\techo \$${.OBJDIR}\n" | $(MAKE) -r -s -f - xxx
---
>       printf "xxx:\n\techo \$${.OBJDIR}\n" | $(MAKE) -r -s -f - xxx

My pool was sup'ed as of early today, and the Ultrix version is 4.4, in case 
this is useful...

- Marc
===============================================================================
Marc Evans                            WB1GRH      The Destek Group, Ltd.
E-Mail: Marc@Destek.NET                           21 Hinds Lane, Suite 23L
URL: http://WWW.Destek.NET/~marc                  Pelham, NH, USA 03076-3013
PGP-2.6 key available upon request                +1 603 635 3857 (voice/fax)
MIME-1.0 & Enriched-Text mail accepted            Internet Access & Services
       The XFree86[tm] Project, Inc. Industry Liason <Marc@XFree86.Org>
===============================================================================