diff --git a/.gitignore b/.gitignore
index 6a25412..69a1b3a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,3 @@
-# ITA:
-build.log
-install.log
-install
-build-stamp
-
-# Upstream:
 *.d
 *.dSYM
 *.o
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 21f0325..0000000
--- a/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-# This is an ITA-specific addition.
-
-VERS=$(shell grep '^"' version.lisp-expr|sed 's/"//g')
-
-# Old GNU makes don't have abspath; make a hacky version
-ifeq ($(abspath /),)
-abspath=$(foreach file,$(1),$(if $(filter /%,$(file)),$(file),$(CURDIR)/$(file)))
-else
-abspath=$(abspath $(1))
-endif
-
-# INSTALL_DIR can be specified by user in incoming environment
-INSTALL_DIR ?= install
-
-INSTALL_DIR_VER=$(call abspath,$(INSTALL_DIR)/$(VERS))
-
-SBCL ?= sbcl
-
-all: install
-
-build: build-stamp
-build-stamp:
-	sh ./make.sh "$(SBCL) --disable-debugger --no-sysinit --no-userinit" \
-		> build.log 2>&1 || (cat build.log ; exit 1)
-	touch build-stamp
-
-install: build-stamp
-	@if [ -e $(INSTALL_DIR_VER) ]; then \
-	    echo "Install location for this version already exists: $(INSTALL_DIR_VER)"; \
-	    exit 1; \
-	fi
-
-	mkdir -p $(INSTALL_DIR_VER)
-	INSTALL_ROOT=$(INSTALL_DIR_VER) sh ./install.sh > install.log 2>&1
-	cp ita/sbcl-starter $(INSTALL_DIR_VER)/sbcl
-	echo "Done!"
-
-version.lisp-expr:
-	@. ./generate-version.sh; generate_version > /dev/null
-
-sbcl-version: version.lisp-expr
-	@echo $(VERS)
-
-install-link:
-
-clean:
-	rm -rf build-stamp whitespace-stamp build.log install.log output obj
-	./clean.sh
-
-.PHONY: build install all clean version.lisp-expr
diff --git a/base-target-features.lisp-expr b/base-target-features.lisp-expr
index 836d2ed..e469fda 100644
--- a/base-target-features.lisp-expr
+++ b/base-target-features.lisp-expr
@@ -38,14 +38,6 @@
 ;;;; files for more information.
 
 (
- ;; ITA specific features
-
- ;; Refers to the KLUDGE combo for propagate-live-tns, telling QRES that
- ;; it doesn't need to patch SBCL..
- :compiler-looping-bug-fixed
- ;; I started defining these for things that require QPX changes
- :ita-use-os-exit
-
  ;;
  ;; features present in all builds
  ;;
@@ -267,8 +259,6 @@
  ;; Support for the entirety of the 21-bit character space defined by
  ;; the Unicode consortium, rather than the classical 8-bit ISO-8859-1
  ;; character set.
-
- ;; MIGHT NOT WANT ; cracauer
  :sb-unicode
 
  ;; Support for a full evaluator that can execute all the CL special
@@ -341,8 +331,7 @@
  ;; SBCL has optional support for zlib-based compressed core files.  Enable
  ;; this feature to compile it in.  Obviously, doing so adds a dependency
  ;; on zlib.
- ;; cracauer wants this
- :sb-core-compression
+ ; :sb-core-compression
 
  ;; On certain thread-enabled platforms, synchronization between threads
  ;; for the purpose of stopping and starting the world around GC can be
diff --git a/clean.sh b/clean.sh
index 4aa580d..e56d79f 100755
--- a/clean.sh
+++ b/clean.sh
@@ -73,7 +73,6 @@ done
 #   test-passed
 #     generated by automatic directory-test-thyself procedure
 find . \( \
-        -name install -o \
         -name _darcs -o \
         -name '{arch}' -o \
         -name CVS -o \
@@ -120,4 +119,4 @@ find . \( \
         -name 'tags' -o \
         -name 'test-passed' -o \
         -name 'ldso-stubs.S' -o \
-        -name 'local-target-features.lisp-expr' \) -print | xargs --verbose rm -fr
+        -name 'local-target-features.lisp-expr' \) -print | xargs rm -fr
diff --git a/contrib/asdf-module.mk b/contrib/asdf-module.mk
index f413700..dba81ea 100644
--- a/contrib/asdf-module.mk
+++ b/contrib/asdf-module.mk
@@ -9,11 +9,11 @@
 UNAME:=$(shell uname -s)
 
 ifeq (SunOS,$(UNAME))
-  EXTRA_CFLAGS+=-D_XOPEN_SOURCE=500 -D__EXTENSIONS__
+  EXTRA_CFLAGS=-D_XOPEN_SOURCE=500 -D__EXTENSIONS__
   PATH:=/usr/xpg4/bin:${PATH}
 endif
 ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
-  EXTRA_CFLAGS+=-mno-cygwin
+  EXTRA_CFLAGS=-mno-cygwin
   # GCC 4.x doesn't accept -mno-cygwin.
   CC:=gcc-3
   # SBCL can't read cygwin symlinks, and cygwin likes to symlink
@@ -22,7 +22,7 @@ ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
   CC:=$(shell cygpath -m $(shell readlink -fn $(shell which $(CC))))
 endif
 ifeq (Linux,$(UNAME))
-  EXTRA_CFLAGS+=-D_GNU_SOURCE
+  EXTRA_CFLAGS=-D_GNU_SOURCE
 endif
 
 export CC SBCL EXTRA_CFLAGS EXTRA_LDFLAGS
@@ -39,13 +39,6 @@ test: all
 
 # KLUDGE: There seems to be no portable way to tell tar to not to
 # preserve owner, so chown after installing for the current user.
-
-# google RE-KLUDGE: The output location on the builder gets
-# pre-populated with the directories we've told it we'll write into,
-# but they're owned by a different user. So, we cannot set their
-# permissions or ownership. Tar *really* wants to do that and blows up
-# if it cannot, so, use rsync instead. As a bonus, don't need the
-# chown.
-
 install: $(EXTRA_INSTALL_TARGETS)
-	rsync -vrl ./ "$(BUILD_ROOT)$(INSTALL_DIR)/"
+	tar cf - . | ( cd "$(BUILD_ROOT)$(INSTALL_DIR)" && tar xpvf - )
+	find "$(BUILD_ROOT)$(INSTALL_DIR)" -exec chown `id -u`:`id -g` {} \;
diff --git a/contrib/sb-bsd-sockets/tests.lisp b/contrib/sb-bsd-sockets/tests.lisp
index 5981618..7ce9d39 100644
--- a/contrib/sb-bsd-sockets/tests.lisp
+++ b/contrib/sb-bsd-sockets/tests.lisp
@@ -89,16 +89,6 @@
     (non-blocking-mode s))
   t)
 
-(defun do-gc-portably ()
-  ;; cmucl on linux has generational gc with a keyword argument,
-  ;; sbcl GC function takes same arguments no matter what collector is in
-  ;; use
-  #+(or sbcl gencgc) (SB-EXT:gc :full t)
-  ;; other platforms have full gc or nothing
-  #-(or sbcl gencgc) (sb-ext:gc))
-
-;; Disable for ita build, as sometimes we can't listen on arbitrary sockets.
-#-ita
 (deftest inet-socket-bind
   (let* ((tcp (get-protocol-by-name "tcp"))
          (address (make-inet-address "127.0.0.1"))
diff --git a/contrib/sb-posix/posix-tests.lisp b/contrib/sb-posix/posix-tests.lisp
index 699e886..c73f2d1 100644
--- a/contrib/sb-posix/posix-tests.lisp
+++ b/contrib/sb-posix/posix-tests.lisp
@@ -443,7 +443,7 @@
                   sb-posix::o-nonblock)))
   t)
 
-#-(or hpux win32 ita) ; fix: cant handle c-vargs
+#-(or hpux win32) ; fix: cant handle c-vargs
 (deftest fcntl.flock.1
     (locally (declare (sb-ext:muffle-conditions sb-ext:compiler-note))
       (let ((flock (make-instance 'sb-posix:flock
@@ -478,7 +478,7 @@
   42)
 
 
-#-(or win32 netbsd ita)
+#-(or win32 netbsd)
 (deftest fcntl.flock.2
     (locally (declare (sb-ext:muffle-conditions sb-ext:compiler-note))
       (let ((flock (make-instance 'sb-posix:flock
diff --git a/customize-target-features.lisp b/customize-target-features.lisp
deleted file mode 100644
index be4f5bf..0000000
--- a/customize-target-features.lisp
+++ /dev/null
@@ -1 +0,0 @@
-(lambda (features) (list* :ita :sb-thread features))
diff --git a/generate-version.sh b/generate-version.sh
index d8dc301..7d2ef6f 100755
--- a/generate-version.sh
+++ b/generate-version.sh
@@ -35,7 +35,14 @@ generate_version() {
     fi
     if [ -z "$SBCL_BUILDING_RELEASE_FROM" ]
     then
-	version_root=$(git merge-base HEAD origin/master)
+        if [ "`git rev-list HEAD --not origin/master`" = '' ]
+        then
+            # If origin/master contains all the commits on current
+            # branch, use current head as the root instead.
+            version_root="$version_branchname"
+        else
+            version_root="origin/master"
+        fi
     else
         version_root="$SBCL_BUILDING_RELEASE_FROM"
     fi
diff --git a/ita/ita-make-32on64.sh b/ita/ita-make-32on64.sh
deleted file mode 100644
index f7ba4fa..0000000
--- a/ita/ita-make-32on64.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-EXTRA_CFLAGS=-m32
-EXTRA_LDFLAGS=-m32
-CC="gcc -m32"
-CXX="g++ -m32"
-export EXTRA_CFLAGS EXTRA_LDFLAGS CC CXX
-linux32 sh ./make.sh
-
-#!/bin/sh
-EXTRA_CFLAGS=-m32
-EXTRA_LDFLAGS=-m32
-CC="gcc -m32"
-CXX="g++ -m32"
-export EXTRA_CFLAGS EXTRA_LDFLAGS CC CXX
-linux32 sh ./make.sh
-
-#!/bin/sh
-EXTRA_CFLAGS=-m32
-EXTRA_LDFLAGS=-m32
-CC="gcc -m32"
-CXX="g++ -m32"
-export EXTRA_CFLAGS EXTRA_LDFLAGS CC CXX
-linux32 sh ./make.sh
-
diff --git a/ita/sbcl-starter b/ita/sbcl-starter
deleted file mode 100755
index cd03002..0000000
--- a/ita/sbcl-starter
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-myself="$0"
-if [ -L "$0" ] ; then
-        myself="`readlink "$0"`"
-fi
-mydir=`dirname "$myself"`
-
-export SBCL_HOME="${mydir}/lib/sbcl"
-exec "${mydir}/bin/sbcl" "$@"
diff --git a/package-data-list.lisp-expr b/package-data-list.lisp-expr
index 06404e5..d0ced09 100644
--- a/package-data-list.lisp-expr
+++ b/package-data-list.lisp-expr
@@ -629,7 +629,6 @@ like *STACK-TOP-HINT* and unsupported stuff like *TRACED-FUN-LIST*."
                "GET-TIME-OF-DAY"
 
                ;; People have various good reasons to mess with the GC.
-               "*BEFORE-GC-HOOKS*"
                "*AFTER-GC-HOOKS*"
                "BYTES-CONSED-BETWEEN-GCS"
                "GC" "GET-BYTES-CONSED"
diff --git a/src/code/cold-init.lisp b/src/code/cold-init.lisp
index 20cc49a..edeb787 100644
--- a/src/code/cold-init.lisp
+++ b/src/code/cold-init.lisp
@@ -92,8 +92,7 @@
   ;; !UNIX-COLD-INIT. And *TYPE-SYSTEM-INITIALIZED* could be changed to
   ;; *TYPE-SYSTEM-INITIALIZED-WHEN-BOUND* so that it doesn't need to
   ;; be explicitly set in order to be meaningful.
-  (setf *before-gc-hooks* nil
-        *after-gc-hooks* nil
+  (setf *after-gc-hooks* nil
         *in-without-gcing* nil
         *gc-inhibit* t
         *gc-pending* nil
diff --git a/src/code/condition.lisp b/src/code/condition.lisp
index e4e0681..0c4d22d 100644
--- a/src/code/condition.lisp
+++ b/src/code/condition.lisp
@@ -1315,8 +1315,7 @@ the values returned by the form as a list. No associated restarts."))
   (:documentation "Condition signaled when STEP returns."))
 
 ;;; A knob for muffling warnings, mostly for use while loading files.
-(defvar *muffled-warnings* '(or uninteresting-redefinition
-                                undefined-alien-style-warning)
+(defvar *muffled-warnings* 'uninteresting-redefinition
   "A type that ought to specify a subtype of WARNING.  Whenever a
 warning is signaled, if the warning if of this type and is not
 handled by any other handler, it will be muffled.")
diff --git a/src/code/gc.lisp b/src/code/gc.lisp
index 1cd508c..b0f5fbc 100644
--- a/src/code/gc.lisp
+++ b/src/code/gc.lisp
@@ -133,11 +133,6 @@ and submit it as a patch."
 
 ;;;; GC hooks
 
-(defvar *before-gc-hooks* nil
-  "Called before each garbage collection, except for garbage collections
-triggered during thread exits. In a multithreaded environment these hooks may
-run in any thread.")
-
 (defvar *after-gc-hooks* nil
   "Called after each garbage collection, except for garbage collections
 triggered during thread exits. In a multithreaded environment these hooks may
@@ -248,11 +243,6 @@ statistics are appended to it."
                  (let ((*gc-inhibit* t))
                    (let ((old-usage (dynamic-usage))
                          (new-usage 0))
-                     (dolist (hook *before-gc-hooks*)
-                       (handler-case
-                           (funcall hook)
-                         (error (c)
-                           (warn "Error calling before-GC hook ~S:~% ~A" hook c))))
                      (unsafe-clear-roots gen)
                      (gc-stop-the-world)
                      (let ((start-time (get-internal-run-time)))
diff --git a/src/code/stream.lisp b/src/code/stream.lisp
index 970497f..2bc1aa7 100644
--- a/src/code/stream.lisp
+++ b/src/code/stream.lisp
@@ -639,10 +639,7 @@
     (if (ansi-stream-p stream)
         (ansi-stream-write-string string stream start end)
         ;; must be Gray streams FUNDAMENTAL-STREAM
-        ;; HACK HACK HACK: call stream-write-string with 2 args when possible.
-        (if (and (= start 0) (or (null end) (= end (length string))))
-            (stream-write-string stream string)
-            (stream-write-string stream string start end))))
+        (stream-write-string stream string start end)))
   string)
 
 (defun write-string (string &optional (stream *standard-output*)
diff --git a/src/compiler/generic/parms.lisp b/src/compiler/generic/parms.lisp
index 80eaad0..4661321 100644
--- a/src/compiler/generic/parms.lisp
+++ b/src/compiler/generic/parms.lisp
@@ -31,8 +31,7 @@
                 `(+ dynamic-space-start
                     (ecase n-word-bits
                       (32 (expt 2 29))
-                      ;; ITA: use 8GB default.
-                      (64 (* 8 (expt 2 30)))))))))))
+                      (64 (expt 2 30))))))))))
 
 #!+gencgc
 ;; Define START/END constants for GENCGC spaces.
diff --git a/src/compiler/x86/parms.lisp b/src/compiler/x86/parms.lisp
index c729a90..ec89f34 100644
--- a/src/compiler/x86/parms.lisp
+++ b/src/compiler/x86/parms.lisp
@@ -184,105 +184,16 @@
 ;;;        starting at #x40000000. By only using 512 - 64 MB we can
 ;;;        run under the default 512 MB data size resource limit.
 
-#!+win32
-(progn
-  (def!constant read-only-space-start #x22000000)
-  (def!constant read-only-space-end   #x220ff000)
-
-  (def!constant static-space-start    #x22100000)
-  (def!constant static-space-end      #x221ff000)
-
-  (def!constant dynamic-space-start   #x22300000)
-  (def!constant dynamic-space-end     (!configure-dynamic-space-end))
-
-  (def!constant linkage-table-space-start #x22200000)
-  (def!constant linkage-table-space-end   #x222ff000))
-
-#!+linux
-(progn
-  (def!constant read-only-space-start     #x00010000)
-  (def!constant read-only-space-end       #x00050000)
-
-  (def!constant static-space-start        #x00050000)
-  (def!constant static-space-end          #x00090000)
-
-  (def!constant dynamic-space-start       #x09000000)
-  (def!constant dynamic-space-end         (!configure-dynamic-space-end))
-
-  (def!constant linkage-table-space-start #x00090000)
-  (def!constant linkage-table-space-end   #x000d0000))
-
-#!+sunos
-(progn
-  (def!constant read-only-space-start     #x20000000)
-  (def!constant read-only-space-end       #x200ff000)
-
-  (def!constant static-space-start        #x20100000)
-  (def!constant static-space-end          #x201ff000)
-
-  (def!constant dynamic-space-start       #x48000000)
-  (def!constant dynamic-space-end         (!configure-dynamic-space-end))
-
-  (def!constant linkage-table-space-start #x20200000)
-  (def!constant linkage-table-space-end   #x202ff000))
-
-#!+freebsd
-(progn
-  (def!constant read-only-space-start     #x01000000)
-  (def!constant read-only-space-end       #x010ff000)
-
-  (def!constant static-space-start        #x01100000)
-  (def!constant static-space-end          #x011ff000)
-
-  (def!constant dynamic-space-start       #x58000000)
-  (def!constant dynamic-space-end         (!configure-dynamic-space-end))
-
-  (def!constant linkage-table-space-start #x01200000)
-  (def!constant linkage-table-space-end   #x012ff000))
-
-#!+openbsd
-(progn
-  (def!constant read-only-space-start     #x1b000000)
-  (def!constant read-only-space-end       #x1b0ff000)
-
-  (def!constant static-space-start        #x1b100000)
-  (def!constant static-space-end          #x1b1ff000)
-
-  (def!constant dynamic-space-start       #x40000000)
-  (def!constant dynamic-space-end         (!configure-dynamic-space-end))
-
-  (def!constant linkage-table-space-start #x1b200000)
-  (def!constant linkage-table-space-end   #x1b2ff000))
-
-#!+netbsd
-(progn
-  (def!constant read-only-space-start     #x20000000)
-  (def!constant read-only-space-end       #x200ff000)
-
-  (def!constant static-space-start        #x20100000)
-  (def!constant static-space-end          #x201ff000)
-
-  (def!constant dynamic-space-start       #x60000000)
-  (def!constant dynamic-space-end         (!configure-dynamic-space-end))
-
-  ;; In CMUCL: 0xB0000000->0xB1000000
-  (def!constant linkage-table-space-start #x20200000)
-  (def!constant linkage-table-space-end   #x202ff000))
-
-
-#!+darwin
-(progn
-  (def!constant read-only-space-start #x04000000)
-  (def!constant read-only-space-end   #x040ff000)
-
-  (def!constant static-space-start    #x04100000)
-  (def!constant static-space-end      #x041ff000)
-
-  (def!constant dynamic-space-start #x10000000)
-  (def!constant dynamic-space-end   (!configure-dynamic-space-end))
-
-  (def!constant linkage-table-space-start #x04200000)
-  (def!constant linkage-table-space-end   #x042ff000))
+;;; NetBSD configuration used to have this comment regarding the linkage
+;;; table: "In CMUCL: 0xB0000000->0xB1000000"
+
+#!+win32   (!gencgc-space-setup #x22000000 nil nil #x10000)
+#!+linux   (!gencgc-space-setup #x01000000 #x09000000)
+#!+sunos   (!gencgc-space-setup #x20000000 #x48000000)
+#!+freebsd (!gencgc-space-setup #x01000000 #x58000000)
+#!+openbsd (!gencgc-space-setup #x1b000000 #x40000000)
+#!+netbsd  (!gencgc-space-setup #x20000000 #x60000000)
+#!+darwin  (!gencgc-space-setup #x04000000 #x10000000)
 
 ;;; Size of one linkage-table entry in bytes.
 (def!constant linkage-table-entry-size 8)
diff --git a/src/runtime/Config.x86-linux b/src/runtime/Config.x86-linux
index 5fc3b7b..6f12bc4 100644
--- a/src/runtime/Config.x86-linux
+++ b/src/runtime/Config.x86-linux
@@ -27,8 +27,6 @@ OS_SRC = linux-os.c x86-linux-os.c
 # (You *are* encouraged to design and implement a coherent stable
 # interface, though.:-| As far as I (WHN 2002-05-19) know, no one is
 # working on one and it would be a nice thing to have.)
-## OLD ITA FLAGS
-#LINKFLAGS += -Wl,--export-dynamic -Wl,--section-start -Wl,.interp=0x000d0fff
 LINKFLAGS += -Wl,--export-dynamic -m32
 OS_LIBS = -ldl
 
diff --git a/src/runtime/GNUmakefile b/src/runtime/GNUmakefile
index 97f4c58..3d75800 100644
--- a/src/runtime/GNUmakefile
+++ b/src/runtime/GNUmakefile
@@ -17,17 +17,17 @@ TARGET=sbcl
 # Defaults which might be overridden or modified by values in the
 # Config file. Most of them are same on most systems right now.
 # If you need to override one of these, do it in Config.
-LD ?= ld
-LINKFLAGS += -g
-NM ?= nm -gp
+LD = ld
+LINKFLAGS = -g
+NM = nm -gp
 DEPEND_FLAGS = -MM
-GREP ?= grep
+GREP = grep
 
 include ../../output/prefix.def
 
-CFLAGS += -g -Wall -Wsign-compare -O3
-ASFLAGS += $(CFLAGS)
-CPPFLAGS += -I. -DSBCL_PREFIX=\"$(SBCL_PREFIX)\"
+CFLAGS = -g -Wall -Wsign-compare -O3
+ASFLAGS = $(CFLAGS)
+CPPFLAGS = -I. -DSBCL_PREFIX=\"$(SBCL_PREFIX)\"
 
 # Give make access to the target Lisp features.
 include genesis/Makefile.features
diff --git a/src/runtime/gencgc.c b/src/runtime/gencgc.c
index 8bb0a38..fce1824 100644
--- a/src/runtime/gencgc.c
+++ b/src/runtime/gencgc.c
@@ -106,12 +106,6 @@ boolean gencgc_verbose = 1;
 boolean gencgc_verbose = 0;
 #endif
 
-void crastuff (int arg)
-{
-  fprintf(stderr, "crastuff %s", arg);
-  gencgc_verbose = arg;
-}
-
 /* FIXME: At some point enable the various error-checking things below
  * and see what they say. */
 
diff --git a/src/runtime/linux-os.c b/src/runtime/linux-os.c
index 46d2549..b7ceca1 100644
--- a/src/runtime/linux-os.c
+++ b/src/runtime/linux-os.c
@@ -356,36 +356,12 @@ os_vm_address_t
 os_map(int fd, int offset, os_vm_address_t addr, os_vm_size_t len)
 {
     os_vm_address_t actual;
-    off_t tmp;
-
-    /* HUGE KLUDGE: if we want the core to have anonymous mappings, we first
-     * mmap the region we asked for, then read(2) from the FD there. Urk. */
-    if (anon_core) {
-        actual = mmap(addr, len, OS_VM_PROT_ALL, MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS,
-                      -1, 0);
-        if (actual == MAP_FAILED || (addr && (addr != actual))) {
-            perror("mmap");
-            lose("unexpected mmap(..) failure\n");
-        }
-        if (0 != offset) {
-            if ((tmp = lseek(fd, 0, SEEK_CUR))<0)
-                lose("unexptected lseek() failure");
-            if (lseek(fd, offset, SEEK_SET)<0)
-                lose("really unexpected lseek() failure");
-        }
-        if (len != read(fd, actual, len))
-            lose("unexpected short read()");
-        if (lseek(fd, tmp, SEEK_SET)<0)
-            lose("definitely unexpected lseek() failure");
-    }
-    /* The normal, sane, case. */
-    else {
-        actual = mmap(addr, len, OS_VM_PROT_ALL, MAP_PRIVATE | MAP_FIXED,
-                      fd, (off_t) offset);
-        if (actual == MAP_FAILED || (addr && (addr != actual))) {
-            perror("mmap");
-            lose("unexpected mmap(..) failure\n");
-        }
+
+    actual = mmap(addr, len, OS_VM_PROT_ALL, MAP_PRIVATE | MAP_FIXED,
+                  fd, (off_t) offset);
+    if (actual == MAP_FAILED || (addr && (addr != actual))) {
+        perror("mmap");
+        lose("unexpected mmap(..) failure\n");
     }
 
     return actual;
diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c
index 6777a60..cacc9c7 100644
--- a/src/runtime/runtime.c
+++ b/src/runtime/runtime.c
@@ -351,7 +351,6 @@ parse_size_arg(char *arg, char *arg_name)
 
 char **posix_argv;
 char *core_string;
-boolean anon_core = 0;
 
 struct runtime_options *runtime_options;
 
@@ -498,9 +497,6 @@ main(int argc, char *argv[], char *envp[])
                     core = copied_string(argv[argi]);
                     ++argi;
                 }
-            } else if (0 == strcmp(arg, "--anon-core")) {
-                anon_core = 1;
-                ++argi;
             } else if (0 == strcmp(arg, "--help")) {
                 /* I think this is the (or a) usual convention: upon
                  * seeing "--help" we immediately print our help
diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h
index e1735da..fec8c77 100644
--- a/src/runtime/runtime.h
+++ b/src/runtime/runtime.h
@@ -372,7 +372,6 @@ other_immediate_lowtag_p(lispobj header)
 extern void *successful_malloc (size_t size);
 extern char *copied_string (char *string);
 
-extern boolean anon_core;
 #if defined(LISP_FEATURE_SB_THREAD) && !defined(LISP_FEATURE_SB_SAFEPOINT)
 # define THREADS_USING_GCSIGNAL 1
 #endif
diff --git a/tools-for-build/Makefile b/tools-for-build/Makefile
index 8ab055b..7a4c16f 100644
--- a/tools-for-build/Makefile
+++ b/tools-for-build/Makefile
@@ -10,8 +10,9 @@
 -include genesis/Makefile.features
 -include Config
 
-CPPFLAGS += -I../src/runtime
-LDLIBS := $(OS_LIBS)
+CPPFLAGS:=-I../src/runtime
+LDFLAGS:=$(LDFLAGS)
+LDLIBS:=$(OS_LIBS)
 
 all: grovel-headers determine-endianness where-is-mcontext \
         modify-ldt-struct-name sigaction-sa-nodefer-works-test
