summaryrefslogtreecommitdiff
path: root/emu
diff options
context:
space:
mode:
Diffstat (limited to 'emu')
-rw-r--r--emu/NetBSD/asm-386.S10
-rw-r--r--emu/NetBSD/emu-g102
-rw-r--r--emu/NetBSD/mkfile5
-rw-r--r--emu/NetBSD/mkfile-NetBSD17
-rw-r--r--emu/port/fns.h2
-rw-r--r--emu/port/main.c4
6 files changed, 113 insertions, 27 deletions
diff --git a/emu/NetBSD/asm-386.S b/emu/NetBSD/asm-386.S
index ca701782..d21c03bb 100644
--- a/emu/NetBSD/asm-386.S
+++ b/emu/NetBSD/asm-386.S
@@ -5,7 +5,7 @@
* executeonnewstack(void *tos, void (*tramp)(void *arg), void *arg)
*/
- .type ournewstack,@function
+ .type executeonnewstack,@function
.global executeonnewstack
executeonnewstack:
pushl %ebp
@@ -23,7 +23,7 @@ executeonnewstack:
popl %eax /* recover the tramp address */
call *%eax /* and jump to it (ho ho) */
- /* if we return here, tramp didn't do it's job */
+ /* if we return here, tramp didn't do its job */
addl $8, %esp /* clean up for pose value */
@@ -92,12 +92,6 @@ FPrestore:
popl %ebp
ret
- .type getcallerpc,@function
- .global getcallerpc
-getcallerpc:
- movl 4(%ebp), %eax
- ret
-
.type _tas,@function
.globl _tas
_tas:
diff --git a/emu/NetBSD/emu-g b/emu/NetBSD/emu-g
new file mode 100644
index 00000000..e662b4c1
--- /dev/null
+++ b/emu/NetBSD/emu-g
@@ -0,0 +1,102 @@
+env
+ X11LIBS=
+dev
+ root
+ cons
+ env
+ mnt
+ pipe
+ prog
+ prof
+ srv
+ dup
+ ssl
+ cap
+ fs
+ cmd cmd
+ indir
+
+ ip ipif-posix ipaux
+ eia
+ audio audio
+ mem
+
+lib
+ interp
+ math
+
+ keyring
+ sec
+ mp
+
+ 9
+
+link
+
+mod
+ sys
+ math
+ srv srv
+ keyring
+ crypt
+ ipints
+ loader
+
+port
+ alloc
+ cache
+ chan
+ dev
+ devtab
+
+ dial
+ dis
+ discall
+ env
+ error
+ errstr
+ exception
+ exportfs
+ inferno
+ latin1
+ main
+ parse
+ pgrp
+ print
+ proc
+ qio
+ random
+ sysfile
+ uqid
+
+code
+ void setpointer(int x, int y){USED(x); USED(y);}
+ ulong strtochan(char *s){USED(s); return ~0;}
+
+init
+ emuinit
+
+root
+ /dev /
+ /fd /
+ /prog /
+ /prof /
+ /net /
+ /net.alt /
+ /chan /
+ /nvfs /
+ /env /
+# /chan
+# /dev
+# /dis
+# /env
+# /n
+# /net
+# /nvfs /
+# /prog
+# /icons
+# /osinit.dis
+# /dis/emuinit.dis
+# /dis/lib/auth.dis
+# /dis/lib/ssl.dis
+# /n/local /
diff --git a/emu/NetBSD/mkfile b/emu/NetBSD/mkfile
index 8531a68b..effbaefe 100644
--- a/emu/NetBSD/mkfile
+++ b/emu/NetBSD/mkfile
@@ -14,6 +14,9 @@ INSTALLDIR=$ROOT/$SYSTARG/$OBJTYPE/bin #path of directory where kernel is instal
#end configurable parameters
+# can remove or override X11LIBS using env section in config files
+X11LIBS= -L/usr/X11R7/lib -R/usr/X11R7/lib -lXext -lX11
+
<$ROOT/mkfiles/mkfile-$SYSTARG-$OBJTYPE #set vars based on target system
<| $SHELLNAME ../port/mkdevlist $CONF #sets $IP, $DEVS, $PORT, $LIBS
@@ -29,7 +32,7 @@ OBJ=\
HFILES=\
CFLAGS='-DROOT="'$ROOT'"' -DEMU -I. -I../port -I$ROOT/$SYSTARG/$OBJTYPE/include -I$ROOT/include -I$ROOT/libinterp $CTHREADFLAGS $CFLAGS $EMUOPTIONS
-SYSLIBS= -lXext -lX11 -lossaudio -lm
+SYSLIBS= ${X11LIBS} -lossaudio -lm
KERNDATE=`{$NDATE}
default:V: $O.$CONF
diff --git a/emu/NetBSD/mkfile-NetBSD b/emu/NetBSD/mkfile-NetBSD
deleted file mode 100644
index 3fdc164e..00000000
--- a/emu/NetBSD/mkfile-NetBSD
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# architecture-dependent files for NetBSD
-#
-
-LDFLAGS=
-
-TARGFILES=devfs-posix.$O\
- deveia-NetBSD.$O\
- devip.$O\
- ipif-posix.$O\
- os-NetBSD.$O\
- win-x11.$O\
- srv.$O\
- lock.$O\
- asm-NetBSD-$OBJTYPE.$O
-
-#SYSLIBS= -lXext -lX11 -lossaudio -lm
diff --git a/emu/port/fns.h b/emu/port/fns.h
index 6a0809c0..36d341b7 100644
--- a/emu/port/fns.h
+++ b/emu/port/fns.h
@@ -20,7 +20,7 @@ Dir* chandirstat(Chan*);
void cinit(void);
char* clipread(void);
int clipwrite(char*);
-void (*coherence)(void);
+extern void (*coherence)(void);
void copen(Chan*);
void cmderror(Cmdbuf*, char*);
Block* concatblock(Block*);
diff --git a/emu/port/main.c b/emu/port/main.c
index 158f6b03..da1aa432 100644
--- a/emu/port/main.c
+++ b/emu/port/main.c
@@ -27,6 +27,10 @@ extern int mflag;
ulong displaychan;
char *cputype;
+/* For dynamic linking init/fini code that needs malloc */
+void (*coherence)(void) = nofence;
+
+
static void
usage(void)
{