Wrap everything with an abort restart which will quit and stop make.sh
from proceeding.
Also remove --disable-debugger from the default sbcl options for
better debugging.
Running ./make-config.sh --host-location="host:path/to/sbcl" on the
target causes the make-target-N.sh scripts to do all the copying of
files to and from the host using rsync on the target to the specified
host location.
Because this is rsync, managing the reverse ssh to do this on
heavily-firewalled targets is not straightforward; we might have to
extend the syntax, or have an extra --host-port argument. But this
should I think make the port to arm64 more straightforward.
* Over time, the process for producing an SBCL build for another
target architecture or OS has become more difficult and less
documented.
* Move all make.sh argument processing to make-config.sh.
* Have make-config.sh produce a file, output/build-config,
containing shell commands to set up important build parameters
such as where to find GNUMAKE, what SBCL_XC_HOST is, and so on.
* Source output/build-config in most of the make*.sh scripts.
* The practical upshot of all this is that a cross-compile
build is now a matter of alternating between target and host,
calling make-config.sh, make-host-1.sh, make-target-1.sh,
make-host-2.sh, make-target-2.sh, and following up with a
make-target-contrib.sh on the target, and you wind up with a
usable product. And, as make-config.sh does all of the arg
parsing, you can pass --xc-host= or --dynamic-space-size= or
whatever and it all works out.
- add corruption_warning_and_maybe_lose that prints a warning and
loses depending on lose_on_corruption_p (false by default)
- use corruption_warning_and_maybe_lose when the control stack is
exhausted and on memory faults
- use corruption_warning_and_maybe_lose on the lisp handlers of
SIGILL, SIGBUS and SIGEMT, as invoking them is surely not a good
sign.
- add --lose-on-corruption as a runtime option
- add --disable-ldb as a runtime option
- update the man page and the user manual
- HEAP-EXHAUSTED fixes:
- exit pseduo atomic properly and do pending interrupt if needed
- signalling HEAP-EXHAUSTED in a WITHOUT-INTERRUPTS is dangerous
- use --lose-on-corruption in make-target*.sh
Also, block blockable signals on lose() to prevent other threads,
timers and such from interfering. If only all threads could be stopped
somehow.
* Split make-target-2.lisp into make-target-2.lisp and
make-target-2-load.lisp, reducing unnecessary state that was kept around.
Not keeping symbols that were interned during the compilation of PCL
saves us 400kB on x86 and between 1MB and 1.5MB on x86_86.
* Unintern symbols that are internal to CL-USER before dumping the core.
This doesn't save any space; just removes confusion.
new toplevel options --no-sysinit, --no-userinit to inhibit
loading the corresponding init files
... also fixes the win32 build failure that motivated this change
Beginnings of a Win32 merge.
... rearrange the build scripts to use input from files rather
than <<HERE documents.
... (no other changes; just working to get the meaty changes
isolated from the fluff)
Reduce core file size by 600k+:
* Disable FORMAT-with-constant-format-string transform in the
cross compiler--eliminates many large LAMBDAs from the core;
* Remove call to PURIFY at the beginning of warm init so that
cold-init-only stuff doesn't get moved to read-only space
before it is uninterned and (not) garbage collected.
More build fixes
... for our non-8859-1 friends, explicitly request the C locale
while building.
... running the tests (and indeed starting up the new sbcl)
in unknown locales will fail instantly, but that's probably
less annoying than having the build fail at cold-init time.
... probably stdin/out/err should fall back to ascii external format
if all else fails
* Merge the new intrumentation based single stepper,
excise stale breakpoint code for STEP; TRACE breakpoints
should be unaffected.
* A dash of documentation.
... Controlled by the presence of :sb-package-locks in target
features.
... This builds both with and without package locks on both
x86 Linux and SunOS Sparc, with both CMUCL and SBCL
as host -- so chances are it should build elsewhere as
well.
... Remaining TODO: turn package locking errors from lexical
constructs to program errors in the produced code, fix
the bits in SBCL that hit host's SBCL-tyle package locks
(relevant FIXME is in src/cold/shared.lisp).
deKLUDGE the solution for PACK-BEFORE-GC-HOOK
... well, not completely. PACK remains non-reentrant and
non-threadsafe, but at least now global data structures
don't grow without bounds;
... mostly whitespace changes, but clear the PACK structures
after every call, not once per GC cycle. Marginally
less efficient, I fear :-(
... while we're at it, fix analogously VOP-TN-REFS, and while
we're at it, document that a special is a bit of an
odd way to implement a (non-reentrant non-threadsafe)
closure.
... only one BEFORE-GC-HOOK left.
Miscellaneous fixes
... fix bad behaviour on install.sh on missing directories (reported
Zach Beane sbcl-devel 2004-01-16)
... fix PUSHNEW docstring (patch VJA sbcl-devel 2003-12-30)
... call PACK-BEFORE-GC-HOOK by hand in make-target-2.sh, to get
core sizes down a bit (2Mb on x86, 6Mb on PPC). We're still
awaiting a proper fix, though.
Fix bug 185 (top level forms at the REPL)
... implement a LOCALLY method for EVAL-IN-LEXENV
... factor out MACROLET-DEFINITIONIZE-FUN and
SYMBOL-MACROLET-DEFINITIONIZE-FUN from the IR1
translators for same
... implement SYMBOL-MACROLET and MACROLET for EVAL-IN-LEXENV
in terms of said DEFINITIONIZE-FUN macros and LOCALLY
... set compilation policy in make-target-2 to avoid file scope
limitations
... set interaction policy by hard-coding it in
MAKE-NULL-INTERACTIVE-LEXENV
... throw it together and hope it all still works.
DEFSTRUCT cleanups..
..got rid of old SLOT-ACCESSOR-FORM in favor of
%ACCESSOR-PLACE-FORM, so that now information about
the different types of raw slots is more nearly
centralized in *RAW-SLOT-DATA-LIST*
..moved target-only stuff from near %TARGET-DEFSTRUCT call in
%DEFSTRUCT into %TARGET-DEFSTRUCT
miscellaneous cleanups..
..added (SETQ *PRINT-CIRCLE* T) to the before-proper-printing
hacks in make-target-2.sh
fixed stupid *PRINT-CIRCLE*-related bug in OUTPUT-OBJECT
(introduced in the 0.pre7.76 changes)
(flaky5_branch RIP. There are still problems: debugging data
going astray, and new DEFUN of inline FOO being too
wimpy. But it seems better than 0.pre7.37. So..)
merged flaky5_branch back onto the main branch
(Oops: In the previous version, I worked on "reimplemented
ONCE-ONLY so it expands into a single LET, so that
DECLAREs inside work as they should" enough that I
put it into the commit notes, but then I realized
that using an inline function is a nice way to solve
the UNIX-FAST-SELECT problemm, so I undid the ONCE-ONLY
changes, but forgot to clean up the commit notes.)
(This version builds under sbcl-0.6.13 with :SB-SHOW, and
without :SB-INTERPRETER, in target *FEATURES*. Now
maybe I can use the result to figure out why it can't
build itself.)
Maybe we don't need the extra space in DISASSEM-BYTE-COMPONENT
after all.
added :IGNORE-FAILURE-P for src/cold/cold-init in order to
build with :SB-SHOW
got rid of various early /SHOWs (before the definition of
UNWIND in assem-rtns.lisp is loaded) so that the system
could cold init
chopped make-target-2.sh *PRINT-LEVEL* back down to 5 so that
/SHOW statements terminate before hell freezes over
(Oops, I was wrong before -- I made a typo when I thought I
was deleting :SB-INTERPRETER from target *FEATURES*,
so I didn't test what I thought I tested, and
0.pre7.13 didn't actually work without
:SB-INTERPRETER.)
So, now to make things actually work without :SB-INTERPRETER..
..saved a few things
* CL:LAMBDA-PARAMETERS-LIMIT
* CL:MULTIPLE-VALUES-LIMIT
* CL:CALL-ARGUMENTS-LIMIT
from src/compiler/eval.lisp in early-c.lisp
..SB!EVAL can't be conditional on :SB-INTERPRETER, since it's
the home of stuff like the 'eval stack' (also used
by the byte interpreter).
..made INTERPRETED-FUNCTION-NAME hacking conditional on
:SB-INTERPRETER
..made other SB!EVAL:FOO stuff conditional on :SB-INTERPRETER
..s/#+!sb-show/#!+sb-show/ (Isn't it Perl that Lispers slam
for accepting line noise as valid input?)
..raised make-target-2.sh *PRINT-LENGTH* and *PRINT-LEVEL* to
10 so that
compilation aborted because of input error:
#S(SB-C::INPUT-ERROR-IN-COMPILE-FILE
:ACTUAL-INITARGS (ERROR
#S(READER-ERROR
:ACTUAL-INITARGS (STREAM # FORMAT-CONTROL
no dispatch function defined for ~S
FORMAT-ARGUMENTS ...)
:ASSIGNED-SLOTS NIL))
:ASSIGNED-SLOTS NIL)
would no longer have key information elided
..s/failed-aver-type/failed-enforce-type/
..(This version still doesn't work without :SB-INTERPRETER,
but it does have some progress, and at least it still
works with :SB-INTERPRETER, so I'm checking it in.)
(got confused, thought GENCGC was excessively conservative,
tried to fix it, then backed out)
tweaked a lot of comments and some names in gencgc.c
made GENESIS systematically propagate *SHEBANG-FEATURES*
entries into #define's in sbcl.h. (This isn't currently
used for anything -- I wrote it to support my confused
make-GENCGC-less-conservative effort, which no longer
exists. However, it seems harmless and could be useful
e.g. for making C-level code depend on SB-SHOW, so I
left it in.)
(As per Daniel Barlow sbcl-devel 2001-05-17, the removal of
the mysterious "" special case in UNIX-STAT will
probably keep this version from building itself,
so I didn't even try. It does, however, at least
do "sh run-tests.sh" successfully.)
fixed declaration in %EXTRACT-STAT-RESULTS so that the
system won't have to interpret the alien reference
at runtime on every call to the function
I found how to fix the boot/gencgc/purify problem which was
leaving initial-function unmapped -- I could copy
current_region_free_pointer into
boxed_region.free_pointer just before
gc_alloc_update_page_pages() in save.c. However,
that left me with other flaky GC problems. So I gave
up my GC hacking in this version as a bad job, and
copied original 0.6.12.7 GC-related files over
the modified versions: gencgc.c, save.c, purify.c,
gc.lisp, save.lisp
made %EXTRACT-STAT-RESULTS inline to suppress an apparent
memory corruption bug
(This system state is seriously screwed up. It did build,
both on Linux and on OpenBSD, but signalled an
error after writing out sbcl.core on OpenBSD, and
although it runs a little both on Linux and on
OpenBSD, it hangs in the regression tests. It
also has some temporary hacks marked REMOVEME,
including one which suppresses PURIFY when
building the system (!).)
made the system build on OpenBSD again..
..stubbed stuff out as a quick fix to the problem of FFI to
64-bit stat.st_size
tried to make the system run on OpenBSD again..
..initialized current_dynamic_space, since it's now used
instead of DYNAMIC_SPACE_START in PURIFY
..added new assertions about GENCGC alloc_region stuff being
reset when it should be
renamed Lisp-level struct stat stuff to struct wrapped_stat
tried to tidy up Lisp-level stat stuff; removed mysterious
(STRING= NAME "") behavior from UNIX-STAT
added slam.sh to help in low-level compile-and-try cycle
pulled alloc_region-is-reset logic out into separate
functions, and added more assertions on it (hunting
for a bug which broke the old assertions)
renamed gc_alloc_large to gc_alloc_possibly_large, and
gc_quick_alloc_large_unboxed to
gc_quick_alloc_unboxed_possibly_large
enabled various GC checks, e.g. gencgc_zero_check=1
deleted unused (and bizarre..) gencgc_verify_zero_fill()
turned off PURIFY in order to get the system to build, since
PURIFY seems to be misbehaving (leaving INIT-FUNCTION
above the cutoff address..)
(This version is broken. It builds, but can't build itself,
dying in vop.lisp with what looks like memory
corruption. 0.6.9.11 might be broken the same way.)
no more special support for DECLARE SB-PCL::CLASS
moved policy stuff into policy.lisp
moved !UNINTERN-INIT-ONLY-STUFF to after warm init
renamed some PCL stuff to make it be uninterned after warm init
tweaked DEFCONSTANTs to be more ANSI-compliant (as required
when building using an XC host incorporating changes
from the previous commit) and generally cleaner
got rid of DEFCONSTANT WRAPPER-LAYOUT completely, which was
used only by STRUCTURE-WRAPPER, which is now gone
added SB-INT:DEFCONSTANT-EQX to help ANSIfy DEFCONSTANTs
merged several small files into primordial-extensions.lisp
converted DEFMACRO DEFCONSTANT to use EVAL-WHEN instead of
IR1 magic, in order to make it ANSI enough for
DEFCONSTANT-EQX to work
removed various nested EVAL-WHENs (to help cross-compiler)
identified bug IR1-3, added workaround in DO-EVAL-WHEN-STUFF
incremented fasl file version (because of mismatch between
old IR1 magic %DEFCONSTANT/%%DEFCONSTANT behavior and
new EVAL-WHEN %DEFCONSTANT behavior)
deleted some unused code
fixed (DEFCONSTANT X 1) (DEFVAR X) (SETF X 2) bug
error handling
The MAKE-SPECIALIZABLE-ARRAY call in DEFUN INTERNAL-ERROR-ARGUMENTS
can become MAKE-ARRAY, since M-S-A is something to make it easier to
build parts of the cross-compiler under the cross-compilation host,
and DEFUN INTERNAL-ERROR-ARGUMENTS is in x86-vm.lisp, which is not
part of the cross-compiler, and so is never compiled by the
cross-compilation host.
changed MAKE-VALID-LISP-OBJ from a MACROLET macro to a global
function, for clarity and easier debugging
deleted unused SET-VALUE macro from MACROLET in DEFERR
deleted code marked REMOVEME, accidentally left over from previous
debugging exercises
changed CONTEXT-PC-ADDR, CONTEXT-PC, CONTEXT-REGISTER-ADDR, and
CONTEXT-REGISTER functions to use unsigned representations instead of
signed representations, to conform to implicit assumptions in the
debug-int code inherited from CMU CL. (Without this, new type errors
are generated in infinite regress when we try to handle errors
involving negative fixnums, e.g. (BUTLAST NIL -1).)
tweaked stuff in test/ directory a little bit in anticipation of
setting up real regression tests