Subject: port-sparc/21093: machine/cpuconf.h changes break build
To: None <gnats-bugs@gnats.netbsd.org>
From: Christopher SEKIYA <wileyc@rezrov.net>
List: netbsd-bugs
Date: 04/11/2003 15:16:24
>Number: 21093
>Category: port-sparc
>Synopsis: machine/cpuconf.h changes break build
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: port-sparc-maintainer
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Apr 10 23:17:01 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Christopher SEKIYA
>Release: NetBSD 1.6R
>Organization:
-- Chris
GPG key FEB9DE7F (91AF 4534 4529 4BCC 31A5 938E 023E EEFB FEB9 DE7F)
>Environment:
System: NetBSD reliant 1.6R NetBSD 1.6R (RELIANT) #0: Thu Apr 10 21:58:20 JST 2003 wileyc@izu:/usr/builder/sys/arch/sparc/compile/RELIANT sparc
Architecture: sparc
Machine: sparc
>Description:
The recent introduction of <machine/cpuconf.h> on sparc breaks userland
routines that depend on CPU_SUN* definitions (libkvm for certain,
possibly others.
>How-To-Repeat:
Try to build -current for sparc.
>Fix:
The attached diff installs cpuconf.h into /usr/include/sparc, and
unwraps its inclusion from _KERNEL in <machine/params.h> (I _think_
this is the right fix, but I'm not 100% certain -- things that need
to be visible from userland shouldn't be wrapped in _KERNEL, yes?)
Index: Makefile
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc/include/Makefile,v
retrieving revision 1.25
diff -u -r1.25 Makefile
--- Makefile 2003/01/18 06:44:57 1.25
+++ Makefile 2003/04/11 06:11:20
@@ -4,7 +4,7 @@
INCS= ansi.h aout_machdep.h apmvar.h asm.h autoconf.h \
bswap.h bootinfo.h \
- cdefs.h cgtworeg.h cpu.h \
+ cdefs.h cgtworeg.h cpu.h cpuconf.h \
disklabel.h \
eeprom.h elf_machdep.h endian.h endian_machdep.h \
float.h frame.h fsr.h \
Index: param.h
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc/include/param.h,v
retrieving revision 1.59
diff -u -r1.59 param.h
--- param.h 2003/04/09 16:22:33 1.59
+++ param.h 2003/04/11 06:11:21
@@ -54,8 +54,8 @@
#define MACHINE_ARCH "sparc"
#define MID_MACHINE MID_SPARC
+#include <machine/cpuconf.h>
#ifdef _KERNEL /* XXX */
-#include <machine/cpuconf.h> /* XXX */
#ifndef _LOCORE /* XXX */
#include <machine/cpu.h> /* XXX */
#endif /* XXX */
>Release-Note:
>Audit-Trail:
>Unformatted: