Commit graph

77 commits

Author SHA1 Message Date
Charles Zhang 61370e23f3 Make ./build-all-cores.sh check float files.
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.
2024-04-21 18:13:04 +02:00
Douglas Katzman 28ab0f952c Revert "mark-region: Skip the external compaction step for now"
This reverts commit 04e20e22b9.
After the recent fixes (3830ae22 and c0fe7370) it should be fine.
2024-01-24 13:43:30 -05:00
Douglas Katzman 04e20e22b9 mark-region: Skip the external compaction step for now 2023-12-29 17:38:20 -05:00
Douglas Katzman 6d98ff6c78 mark-region: Implement offline compactor
This can achieve about 2.5x denser page usage than force_compaction,
so the pristine x86-64 core is 40Mib instead of 100MiB
2023-12-29 14:41:06 -05:00
Stas Boukarev e7a689453c Don't enable *check-consistency* with sb-devel.
It can't pass the tests.
2023-06-28 21:46:14 +03:00
Charles Zhang c93b0cd6ec Turn on IR1 consistency checking for self-build.
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.
2023-06-28 12:24:14 +02:00
Douglas Katzman 8b45790d9e Move some post-checks from make-target-2.sh into make.sh 2023-03-29 20:17:01 -04:00
Charles Zhang 1bdc85ab9d Work around remaining RENAME-PACKAGE issue for tll smashing.
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.
2022-05-31 18:01:46 -07:00
Charles Zhang 25c8e92ebc Set SB-C::TOP-LEVEL-LAMBDA-MAX = 0 for now.
To work around incorrect interactions between RENAME-PACKAGE and
fasloading in time for the release. Background is in this thread:

https://sourceforge.net/p/sbcl/mailman/message/37659523/
2022-05-28 12:09:00 -07:00
Richard M Kreuter 1f4d583988 Revert the changes to debug-info, source locations.
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.
2021-05-30 06:08:42 -04:00
Richard M Kreuter 2934e025ba Restore SB-C::*MERGE-PATHNAMES*, building with sb-fasteval. 2021-05-20 14:38:23 -04:00
Richard M Kreuter ed585f7386 Preserve COMPILE-FILE's argument & *D-P-D* through to fasls.
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.
2021-05-20 12:57:48 -04:00
Douglas Katzman 07daf5caf8 Reduce output from load and dump phase 2021-05-19 08:16:49 -04:00
Douglas Katzman 9cfb57efdf Add a global switch to work around CL pathname nonsense
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.
2021-05-05 14:57:37 -04:00
Douglas Katzman 28ddc79abc Perform colonectomy 2020-04-16 17:12:58 -04:00
Douglas Katzman 2044968760 Fix typo - there is no SB-FASTEVAL package
Got broken when removing symbols from *FEATURES* and test was changed
from #+sb-fasteval to an incorrect find-package call.
2020-01-22 19:51:02 -05:00
Douglas Katzman aed385536b Remove not-for-public-consumption keywords from *FEATURES* 2019-12-30 15:44:59 -05:00
Stas Boukarev 8d36bc6d9c Fix make-target-2.sh
== is not a standard test(1) operator.
2019-11-06 00:22:09 +03:00
Douglas Katzman 82e35fba11 Accept another option in make-target-2 2019-11-05 14:18:21 -05:00
Stas Boukarev c0d176024d Remove unused stuff from PCL bootstrapping. 2019-06-21 06:47:56 +03:00
Stas Boukarev c464dd18e5 :save-runtime-options nil doesn't reanable the debugger.
Call (sb-ext:enable-debugger) before saving sbcl.core
2019-02-08 02:25:03 +03:00
Stas Boukarev 6d59734f21 Don't save-runtime-options when saving sbcl.core 2019-02-08 01:16:11 +03:00
Stas Boukarev 84a5d8e96e Fix make-target-2.sh when SBCL_MAKE_TARGET_2_OPTIONS is set. 2019-02-07 23:27:51 +03:00
Stas Boukarev 08025edbe1 Disable the debugger when building on the CI. 2019-02-07 20:57:20 +03:00
Stas Boukarev 2d0f2f0473 More abort->abort-building. 2019-02-02 18:39:31 +03:00
Douglas Katzman 21d811811f Scan for quasi-unreachable FDEFNs after self-build
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.
2018-11-07 17:25:09 -05:00
Douglas Katzman 7091de393e Reject any unknown command-line flag in make-target-2 2018-09-03 20:31:48 -04:00
Douglas Katzman 251f6446d3 Inline COPY-LIST depending on policy 2018-06-28 14:36:40 -04:00
Douglas Katzman ab54e3b775 More SB!XC:DEFMACRO -> DEFMACRO and dial the tree-shaking knob up a notch
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.
2018-04-22 10:40:08 -04:00
Douglas Katzman fb1ba6de5e Remove more strange idioms for symbol pruning
[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.
2018-04-21 21:08:53 -04:00
Douglas Katzman 5f6cedeb0c Provide the :ABORT restart in warm load 2017-10-13 15:45:44 -04:00
Douglas Katzman 88e839395b Forgo loader.lisp in warm build
Why cater to other Lisps? It does not make sense.
2017-10-11 20:19:55 -04:00
Douglas Katzman 0a6dc80484 2-for-1: fix hopscotch tests and cheneygc
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.
2017-05-16 15:39:15 -04:00
Douglas Katzman 92de74a47e Coalesce similar strings in compilation to memory if opted for.
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.
2017-05-12 15:10:11 -04:00
Douglas Katzman e8bfd77b0c Coalesce constant strings more aggressively maybe.
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.
2017-05-03 16:45:07 -04:00
Douglas Katzman b162216376 GC the stream that was opened for make-target-2-load.lisp 2017-02-12 22:25:38 -05:00
Douglas Katzman c89c6837ef Remove make-target-2.lisp, move setting of docstrings.
* 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
2017-02-01 11:54:07 -05:00
Douglas Katzman 514df980d1 Silly omission from #!+immobile-symbols change
i.e. it didn't actually fix the "leftover cold-init symbols",
but merely failed to find them in the heap scan.
2017-01-24 21:31:18 -05:00
Stas Boukarev f251e070cb Fix restarts in make-target-2.sh
Wasn't loading the wrappers with the restarts.
2016-12-03 03:18:08 +03:00
Stas Boukarev 285ee63e88 Make the build process abortable.
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.
2016-10-04 22:17:34 +03:00
Douglas Katzman 13184c3a73 Correct output of leftover cold-init symbols. 2016-02-17 23:41:59 -05:00
Douglas Katzman 4dcf6674c5 Dumper/loader can avoid building primordial layouts bottom up. 2015-02-12 21:49:40 -05:00
Douglas Katzman ff0b9bbe2e Show the "!" symbols that were not uninternable after make-target-2 2015-01-15 18:08:31 -05:00
Stas Boukarev 7906dd0c44 Add --load parameter for make-target-2.sh, skipping compilation. 2014-05-18 18:32:54 +04:00
Christophe Rhodes eccba2ae33 support target-driven cross-compilation
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.
2014-05-11 07:59:01 +01:00
Alastair Bridgewater 7d407220e1 Clean up build process for cross-compiled targets.
* 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.
2011-10-22 17:10:38 -04:00
Gabor Melis d1873cc3f7 1.0.25.21: handling of potential corruptions
- 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.
2009-02-16 21:36:13 +00:00
Andreas Fuchs 70ea779552 1.0.3.4: make-target-2.lisp split into compile and dump phases.
* 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.
2007-02-28 13:01:58 +00:00
Rudi Schlatte 2365c1b81d 0.9.11.12
new toplevel options --no-sysinit, --no-userinit to inhibit
    loading the corresponding init files
    ... also fixes the win32 build failure that motivated this change
2006-04-05 07:46:56 +00:00
Christophe Rhodes 89987c8a15 0.9.8.4:
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)
2005-12-29 16:08:31 +00:00