Check the xfloat-math.lisp-expr files produced in each tree directly,
and dispense with the almost-but-not-quite stand-alone merging utility
which required loading the whole cross-compiler just to check some
lisp expressions matched what they're supposed to be on the host,
which is overkill.
Now we are able to run the full suite of IR1 consistency checks by
default for self-build, which is the first time this code has ever
been used to check SBCL self-build. (Even CMU CL can't completely
rebuild itself with consistency checking on currently, maybe since
1991 or so.)
On #+sb-devel we go even further and keep it on in the final image to
catch problems.
Doesn't work on arm64 because of issues described in parent commit.
Simply force compilation of queued lambdas when a
DEFPACKAGE/MAKE-PACKAGE is seen at compile time, thereby avoiding
issues with RENAME-PACKAGE. Set TOP-LEVEL-LAMBDA-MAX back to 20. This
is for the case which I think is not conforming code, but nevertheless
causes behavioral change. It's not worth trying to solve this to save
a few bytes off of fasls in the case where we have random package
hackery going on, something which doesn't apply to the majority of
code.
What they were trying to do didn't work for everybody, and in any case
were ugly. Autogenerated revert messages:
Revert "Restore SB-C::*MERGE-PATHNAMES*, building with sb-fasteval."
This reverts commit 2934e025ba.
Revert "Preserve COMPILE-FILE's argument & *D-P-D* through to fasls."
This reverts commit ed585f7386.
This consists of (a) splitting one slot into two, albeit in 3
different structures; and (b) having the old source namestring
accessors obey a new variable.
* FILE-INFO's old UNTRUENAME is now PATHNAME-1 and PATHNAME-2. The
first is the original argument (with the type filled in), and the
second is *D-P-D* if merging contributes anything to PATHNAME-1.
* DEBUG-SOURCE and SOURCE-LOCATION now have corresponding NAMESTRING-1
and NAMESTRING-2 slots, with equivalent purpose except when we're
supposed to be storing *SOURCE-NAMESTRING*.
* The new variable SB-EXT:*SOURCE-FILE-DEFAULTING* influences what namestring
introspection functions return. If it's NIL, they return
NAMESTRING-1. If it's :DEFAULT, they return the (equivalent of)
merging NAMESTRING-1 with NAMESTRING-2.
N.B., this removes the recently added SB-C::*MERGE-PATHNAMES*, since
now it's not a question what information to store at compile time, but
whether to return merged or unmerged results at inquiry time.
There are at least two aspects:
- what pathname should go in *compile-file-pathname*
- what namestrings should be stored into on-disk artifacts
(also relates to the namestrings in coverage hash-table)
The spec has nothing to say about the latter, so we can pick anything.
But unfortunately we base the choice on the former, which the spec does say
something about. However, we can clean up a pile of crap and eliminate some
custom handling around this by just making SBCL do the right thing under
control of SB-C::*MERGE-PATHNAMES*. And as it happens, self-build had a use
for this which is now just expoiting the selector switch.
Some are due to leftover cold-init symbols, but others are from macros that
retain macros. Forcibly removes ones that aren't really usable post-build.
And don't put a string in the fdefn-name slot; that's just weird.
SB-PRETTY was in the (default) set of packages in which to retain any symbol
having any "attachment" at all (macro, type, etc). It is now in the list of
packages in which to retain only external symbols.
[Continuing with theme from change bbaae542da]
Of the tricks employed to prevent compile-time-only junk from remaining in
the pristine core, the (EVAL-WHEN (:COMPILE-TOPLEVEL) (SB!XC:DEFMACRO ...))
pattern is particularly unnecessary in as much as it presents an obstacle
to understanding. The tree-shaker will remove unused macros more cleanly.
Moreover, seeing symbols not get dropped as expected by the tree-shaker
shows where we had created a dangling reference to a deleted macro.
(See comment at end of src/code/bignum for example)
Also note that many macros don't need the leading #\! any more,
which eliminates yet another bit of weirdness.
Initializing the cache of memory mappings by asking for a fixed amount
and considering it divisible in half does not do the right thing
if the size of each isn't a multiple of getpagesize(). When the first half
was unmapped, the kernel rounded to its page size, effectively unmapping both.
Previous changes improved the coalescing of compilation to fasl.
Compilation to core can benefit as well. It's a choice of memory
savings versus ANSI compliance. You can't have both.
As before, coalescing is deferred until SAVE-LISP-AND-DIE.
Strings eligible to share data are those dumped into a fasl
via FOP-{BASE,CHARACTER}-STRING, and symbol names.
Whether the string is eligible for sharing is noted when allocated.
The actual sharing is deferred until SAVE-LISP-AND-DIE since it
requires an image-wide hashtable of strings.
* Adjust printer control variables elsewhere, since
both make-target-2*.lisp files essentially wanted that
* Don't bother with package documentation until dumping the image
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)