Subject: emulators/spim broken on mips
To: None <tech-pkg@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-pkg
Date: 11/07/2000 02:57:10
Hi,

It's kinda sad that the mips emulator doesn't work on mips for a couple
of reasons!  I've got some changes to the actual code that I'm about
to commit that fix some math usage (assuming that if "mips" is defined
in the preprocessor that <nan.h> exists), but the second problem is a
little tougher, at least to someone who doesn't know/like imake.

The problem is that there's a file in the Imakefile called
"mips-syscall.c", and when xmkmf is run, "mips" is defined to "1", so we
end up with a line that says:

	BASE_OBJS = ...  1-syscall.o

The following works for me, but looks _way_ ugly.  imake requires
that IMAKEINCLUDE must begin with -I, so that's the reason for the
"-I/dev/null" at the start.  Is there a better way of doing this?

Simon.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/spim/Makefile,v
retrieving revision 1.6
diff -d -p -u -r1.6 Makefile
--- Makefile	2000/03/27 08:54:55	1.6
+++ Makefile	2000/11/06 15:35:34
@@ -15,6 +15,7 @@ NO_WRKSUBDIR=		yes
 HAS_CONFIGURE=		yes
 CONFIGURE_SCRIPT=	./Configure
 USE_IMAKE=		yes
+CONFIGURE_ENV+=		IMAKEINCLUDE="-I/dev/null -Umips"	# no -Dmips
 XMKMF=			xmkmf # don't specify -a option
 
 ALL_TARGET=		y.tab.c depend spim xspim

--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD Sales, Support and Service:  http://www.wasabisystems.com/