diff -ruN /cdrom/trunk/platforms/SqueakNOS/Makefile trunk/platforms/SqueakNOS/Makefile
--- /cdrom/trunk/platforms/SqueakNOS/Makefile	Fri Aug  4 04:40:55 2006
+++ trunk/platforms/SqueakNOS/Makefile	Thu Aug 10 23:25:04 2006
@@ -6,6 +6,8 @@
 EXTERNAL_LIBS = $(addsuffix .dll, $(EXTERNAL_PLUGINS))
 endif
 
+MAKE     = gmake
+
 VM       = SqueakNOS.obj
 VMOUTDIR = $(BLDDIR)
 SQIMAGE  = Squeak3.8-6665full
@@ -16,26 +18,26 @@
 	cp $(SQIMAGE).image boot/iso.template/SqueakNOS.image
 	cp $(SQIMAGE).changes boot/iso.template/SqueakNOS.changes
 	cp $(VMOUTDIR)/$(VM) boot/SqueakNOS.o
-	make -C boot SqueakNOS.try
+	${MAKE} -C boot SqueakNOS.try
 
 iso: all
 	cp $(SQIMAGE).image boot/iso.template/SqueakNOS.image
 	cp $(SQIMAGE).changes boot/iso.template/SqueakNOS.changes
 	cp $(VMOUTDIR)/$(VM) boot/SqueakNOS.o
-	make -C boot SqueakNOS.iso SqueakNOS.cd.vmx
+	${MAKE} -C boot SqueakNOS.iso SqueakNOS.cd.vmx
 	mv boot/SqueakNOS.iso $(BLDDIR)
 	mv boot/SqueakNOS.cd.vmx $(BLDDIR)/SqueakNOS.vmx
 
 distro:
-	make clean
-	make -C boot clean
+	${MAKE} clean
+	${MAKE} -C boot clean
 	rm -rf boot/iso.template/SqueakNOS.*
 	rm -rf boot/iso.template/trunk
 	# cd ../../../ && tar --exclude package-cache --exclude $(BLDDIR)/* --exclude sm --exclude $(SQIMAGE).* --exclude backup -cvf sources.tar trunk/platforms/SqueakNOS trunk/platforms/Cross
 	cd ../../../ && tar --exclude package-cache --exclude $(BLDDIR)/* --exclude info --exclude sm --exclude $(SQIMAGE).* --exclude backup -cvf sources.tar trunk/platforms/SqueakNOS trunk/platforms/Cross
 	cd boot/iso.template && tar xvf ../../../../../sources.tar
 	rm ../../../sources.tar
-	make iso
+	${MAKE} iso
 	cd $(BLDDIR) && tar cjvf SqueakNOS-`date +%d-%b-%Y`.tar.bz2 SqueakNOS.iso SqueakNOS.vmx
 	cd $(BLDDIR) && zip -9 SqueakNOS-`date +%d-%b-%Y`.zip SqueakNOS.iso SqueakNOS.vmx
 
@@ -44,7 +46,7 @@
 RM = rm
 LD = ld
 
-CFLAGS = -g -mpentium -O4 -fno-inline -fomit-frame-pointer -funroll-loops -fschedule-insns2
+CFLAGS = -g -march=pentium -O4 -fno-inline -fomit-frame-pointer -funroll-loops -fschedule-insns2
 LDFLAGS = -static -nostdlib -lm -Xlinker -r
 CXXFLAGS= $(CFLAGS) -felide-constructors
 DEFS  = -DNO_STD_FILE_SUPPORT -DDEBUG -DLSB_FIRST -DX86 $(XDEFS)
@@ -72,7 +74,9 @@
 LIBSRCS = $(wildcard $(SRCDIR)/plugins/$(PLUGIN)/x86-sysv*.S)
 LIBOBJ = $(LIBSRC:.c=.o) $(LIBSRCS:.S=.o)
 
-LIBCOBJS = strcpy.o strncmp.o strcmp.o strlen.o memcpy.o memcmp.o
+LIBCOBJS = strcpy.o strncmp.o strcmp.o strlen.o memcpy.o memcmp.o \
+	modf.o
+LIBMOBJS = ldexp.o
 
 ALLOBJ=		$(VMOBJ) libc.o
 
@@ -132,8 +136,9 @@
 libc.o: /usr/lib/libc.a
 	cd $(OBJDIR)
 	$(AR) x $< $(LIBCOBJS)
-	ld -r -o $(BLDDIR)/$@ $(LIBCOBJS)
-	$(RM) $(LIBCOBJS)
+	$(AR) x $< $(LIBMOBJS)
+	ld -r -o $(BLDDIR)/$@ $(LIBCOBJS) $(LIBMOBJS)
+	$(RM) $(LIBCOBJS) $(LIBMOBJS)
 
 gnu-interp.c: interp.c
 	./gnuify $< > $@
@@ -143,5 +148,5 @@
 
 ### housekeeping
 clean:
-	make -C boot clean
+	${MAKE} -C boot clean
 	-rm -f $(BLDDIR)/* *.iso *.vmx
diff -ruN /cdrom/trunk/platforms/SqueakNOS/freebsd.h trunk/platforms/SqueakNOS/freebsd.h
--- /cdrom/trunk/platforms/SqueakNOS/freebsd.h	Thu Jan  1 09:00:00 1970
+++ trunk/platforms/SqueakNOS/freebsd.h	Thu Aug 10 23:23:32 2006
@@ -0,0 +1,11 @@
+#undef putchar
+#undef getchar
+
+#undef  putc
+#undef  getc
+#undef  __srget
+#undef  __sgetc
+#undef  feof
+#undef  ferror
+#undef  clearerr
+#undef  fileno
diff -ruN /cdrom/trunk/platforms/SqueakNOS/gnuify trunk/platforms/SqueakNOS/gnuify
--- /cdrom/trunk/platforms/SqueakNOS/gnuify	Thu Jul 20 21:14:17 2006
+++ trunk/platforms/SqueakNOS/gnuify	Thu Aug 10 23:23:32 2006
@@ -1,4 +1,4 @@
-#!/usr/bin/gawk -f
+#!/usr/local/bin/gawk -f
 # 
 # Rewrite the interpreter source in $1 to use GNU C extensions, writing the
 # modified file to stdout.
diff -ruN /cdrom/trunk/platforms/SqueakNOS/nos/nos.c trunk/platforms/SqueakNOS/nos/nos.c
--- /cdrom/trunk/platforms/SqueakNOS/nos/nos.c	Fri Jul 21 05:18:37 2006
+++ trunk/platforms/SqueakNOS/nos/nos.c	Thu Aug 10 23:23:32 2006
@@ -2,6 +2,8 @@
 #include "sqPlatformSpecific.h"
 #include "multiboot.h"
 
+#include "../freebsd.h"
+
 void intsInts();
 
 int errno;
diff -ruN /cdrom/trunk/platforms/SqueakNOS/src32/vm/interp.c trunk/platforms/SqueakNOS/src32/vm/interp.c
--- /cdrom/trunk/platforms/SqueakNOS/src32/vm/interp.c	Wed Jul 19 05:59:41 2006
+++ trunk/platforms/SqueakNOS/src32/vm/interp.c	Thu Aug 10 23:23:32 2006
@@ -6,6 +6,8 @@
 
 #include "sqMemoryAccess.h"
 
+#include "../../freebsd.h"
+
 sqInt printCallStack(void);
 void error(char *s);
 void error(char *s) {
