Subject: Re: gcc4 / unused trouble?
To: None <current-users@netbsd.org>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: current-users
Date: 10/19/2006 17:15:47
On Thu, Oct 19, 2006 at 02:55:57PM +0100, Patrick Welche wrote:
> On Thu, Oct 19, 2006 at 12:56:19PM +0100, Patrick Welche wrote:
> > On Sun, Oct 15, 2006 at 10:28:00PM +0100, Patrick Welche wrote:
> > > With cvs from this afternoon:
> > > 
> > > ../../../../arch/i386/i386/compat_13_machdep.c: In function 'compat_13_sys_sigreturn':
> > > ../../../../arch/i386/i386/compat_13_machdep.c:68: error: storage size of 'context' isn't known
> > > ../../../../arch/i386/i386/compat_13_machdep.c:78: error: dereferencing pointer to incomplete type
> > > cc1: warnings being treated as errors
> > > ../../../../arch/i386/i386/compat_13_machdep.c:68: warning: unused variable 'context'
> > 
> > It's more entertaining than that: the kernel config has
> > 
> > options         COMPAT_15       # NetBSD 1.5
> > options         COMPAT_16       # NetBSD 1.6
> > options         COMPAT_20       # NetBSD 2.0
> > options         COMPAT_30       # NetBSD 3.0
> > 
> > not _13, so I wonder why compat_13_machdep.c is found by make depend..
> > 
> > (As COMPAT_13 is not defined, machine/signal.h doesn't define sigcontext13 =>
> > get error)
> 
> Found it: in the kernel config file COMPAT_AOUT is defined and not COMPAT_13.
> 
> What is the best solution? define COMPAT_13 ifdef COMPAT_AOUT ?

Matthias Drochner sorted me out off-list: COMPAT_AOUT is no more (EXEC_AOUT
is always enabled for i386 in std.i386), and the following makes my
out-of-date kernel config file harmless..

Cheers,

Patrick

RCS file: /cvsroot/src/sys/arch/i386/conf/files.i386,v
retrieving revision 1.293
diff -u -r1.293 files.i386
--- files.i386  1 Oct 2006 18:37:54 -0000       1.293
+++ files.i386  19 Oct 2006 16:14:52 -0000
@@ -353,7 +353,7 @@
 file   arch/i386/i386/kvm86call.S              kvm86
 
 # Binary compatibility with previous NetBSD releases (COMPAT_XX)
-file   arch/i386/i386/compat_13_machdep.c      compat_13 | compat_aout
+file   arch/i386/i386/compat_13_machdep.c      compat_13
 file   arch/i386/i386/compat_16_machdep.c      compat_16 | compat_ibcs2
 
 # SVR4 binary compatibility (COMPAT_SVR4)