Subject: Re: Another problem...
To: Johnny Billquist <bqt@softjar.se>
From: Michael L. Hitch <mhitch@lightning.msu.montana.edu>
List: port-vax
Date: 04/14/2007 10:58:34
On Sat, 14 Apr 2007, Johnny Billquist wrote:
> We still have the problem with gcc with any optimization causing a crash.
I have gotten around this by building cc1 and cc1plus with -O1. I've
got these changes on my build system, but I've not completely verified
that it works completely.
Index: gnu/usr.bin/gcc4/cc1/Makefile
===================================================================
RCS file: /cvsroot/src/gnu/usr.bin/gcc4/cc1/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- gnu/usr.bin/gcc4/cc1/Makefile 12 Nov 2006 01:24:44 -0000 1.3
+++ gnu/usr.bin/gcc4/cc1/Makefile 14 Apr 2007 16:49:23 -0000
@@ -9,4 +9,8 @@
COPTS+= -Wno-stack-protector
+.if ${MACHINE} == "vax"
+CFLAGS+= -O1
+.endif
+
.PATH: ${DIST}/gcc ${G_out_file:H}
Index: gnu/usr.bin/gcc4/cc1plus/Makefile
===================================================================
RCS file: /cvsroot/src/gnu/usr.bin/gcc4/cc1plus/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- gnu/usr.bin/gcc4/cc1plus/Makefile 1 Jul 2006 19:06:51 -0000 1.2
+++ gnu/usr.bin/gcc4/cc1plus/Makefile 14 Apr 2007 16:49:23 -0000
@@ -12,4 +12,8 @@
# YUCK. but see timevar.h:POP_TIMEVAR_AND_RETURN
CFLAGS+= -Wno-error # not good enough: -Wno-return-type
+.if ${MACHINE} == "vax"
+CFLAGS+= -O1
+.endif
+
.PATH: ${DIST}/gcc/cp ${DIST}/gcc ${G_out_file:H}
> I was reminded of it today when I thought I'd try to build gcc natively on
> the VAX, by passing an empty string as CFLAGS, so that gcc would have been
> built without any optimizations. That should be interesting, I thought.
I've been working on building the tools on the VAX, and I've been using
HOST_CFLAGS=-O1. I've not actually completed a build yet, but have gotten
a couple of more fixes into the tree. -O0 would be needed if gcc had been
built with -O2.
My first attempt used -O2, and the resulting gcc toolchain failed when
trying to build a kernel on the VAX. I then did a GENERIC kernel without
useing the toolchain, and have been running that kernel for 25 hours now -
trying to build the toolchain with the -O1 flag.
> However, the build stops before doing any real work. autoconf is running
> through for libiberty, and when it's about time to build, the config.result
> file is read in for parsing, and then it crashes. Looking in the
> config.result file shows sections of NUL characters some way in.
>
> So. Anyone else seen something like this?
I have not seen this on my system. I've had lots of other problems, but
not this one.
--
Michael L. Hitch mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University Bozeman, MT USA