Subject: Re: Status of NetBSD-current vax
To: None <port-vax@NetBSD.org>
From: Matthias Scheler <tron@NetBSD.org>
List: port-vax
Date: 04/05/2005 10:22:59
On Mon, Apr 04, 2005 at 08:17:30PM -0600, Michael L. Hitch wrote:
> > cross building NetBSD-current vax on a NetBSD 2.0.2 system fails like this:
> >
> > #   compile  identd/identd.o
> > /scratch/tron/toolsdir/bin/vax--netbsdelf-gcc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wno-uninitialized -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -std=c99  -Werror   -I/src/NetBSD-current/src/sys/dist/ipf -DWITH_IPF -DWITH_PF  -nostdinc -isystem /scratch/tron/destdir/usr/include  -c    /src/NetBSD-current/src/libexec/identd/identd.c
> > cc1: unknown C standard `c99'
> >
> > *** Failed target:  identd.o
> >
> > Is this a known issue?
> 
>   I'm not sure if it's a "known" issue, but it appears to be due to WARNS
> being set to 4 in the Makefile, which adds the -std=c99 option - which I
> would presume is not supported by GCC 2.95 used on the vax.

Ah, that's where the flag comes from. I'll try this patch later:

Index: bsd.sys.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.sys.mk,v
retrieving revision 1.115
diff -u -r1.115 bsd.sys.mk
--- bsd.sys.mk  20 Feb 2005 01:31:44 -0000      1.115
+++ bsd.sys.mk  5 Apr 2005 09:22:23 -0000
@@ -26,7 +26,7 @@
 .if ${WARNS} > 2
 CFLAGS+=       -Wcast-qual -Wwrite-strings
 .endif
-.if ${WARNS} > 3
+.if ${WARNS} > 3 && ${MACHINE_ARCH} != "vax"
 CFLAGS+=       -std=c99
 .endif
 .endif

	Kind regards

-- 
Matthias Scheler                                  http://scheler.de/~matthias/