Run a C program instead using SB-EXT:RUN-PROGRAM.
At least one motivating reason is that a recent commit allowed the
generator to accept fewer than 5 keys but the old one would invoke lose()
when given 3 or 4 keys, quickly terminating your make-host-2 pass.
Since contrib modules are not regression-tested when just built,
and we endeavor to release code that at least builds cleanly,
there is almost no chance that the script could report a failure.
Specifically, stop producing and looking for build-passed
files as a success indicator. Counting the fasls is adequate.
Most build systems distinguish a failed build from a failed test run,
but make.sh has a hard time doing that because of the conflation of the two.
The whole regression suite should be run if you want to ensure a good build,
so that would be a good time to test contribs. Not only that, with ASDF
we obscured a ton of style-warnings, we lost sandboxing of input files,
the ability to use --evaluator-mode, automatic generation and cleanup of
scratch pathnames, and automatic sb-sprof profiling.
So convert contrib tests to use WITH-TEST except some that gave me trouble.
This makes the output a ton more readable, and makes bisection on seldom-used
configurations quicker, not to mention that SB-RT is very lame anyway.
And there is quite literally less code to maintain now. Go figure.
CDPATH isn't supposed to be exported, but it can be; and POSIX says cd
should always use PWD after searching CDPATH, but some recent OS
releases still ship versions of /bin/sh that don't. So let's have our
build scripts continue to be explicit about where they're cd'ing to.
i.e. do not fail if the host lisp isn't found, barring any other failures.
Intuitively the check for a host lisp belongs in 'make.sh', but the rationale
for putting it in make-config is that failing sooner makes sense if the build
can't begin. But it was an incorrect behavior for make-config when run at the
shell prompt while trying to diagnose problems in that script.
* Avoids dependency on the "expand" tool which is not available on some
platforms.
* Replaces tools-for-build/{canonicalize-whitespace[-1],
check-canonical-whitespace, grep-noncanonical-whitespace,
whitespacely-canonical-filenames} with
tools-for-build/canonicalize-whitespace.lisp
Also, move contrib output to obj/sbcl-home/, asdf cache to obj/asdf-cache/
Update sb-grovel and other contribs and their tests for asdf3.
Fixes lp#1132254.
* 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.
This updates the SBCL build and release process to be more compatible
with distributed development -- to facilitate moving the upstream
repository into Git.
A detailed description of what is going on here is in
doc/GIT-WORKFLOW.md.
Some highlights:
* Drop version.lisp-expr and branch-version.lisp-expr.
* Auto-generate the version at build time using information
from Git, incorporating:
- Last release number.
- Number of commits on origin/master since last release.
- Current branch, if there are commits not on origin/master.
- Number of commits not on origin/master.
- SHA1 id of the last commit.
- Optional -dirty marker.
* Update release.sh to work with Git.
* Make source-distribution.sh exclude the .git directory from tarballs.
* Release tags contain NEWS for that release.
Aka stuff that was supposed to be in .52, but got left out.
* Create output/ if necessary for saving the prefix.
* Put back the semicolon that fell on the floor and rolled into a corner.
Scripting is hard, dammit.
* Empty string as the value for an option is treated as if the option
wasn't provided at all, which makes scripting builds easier.
* Temporary support for legacy-style xc host specifications for the
benefit of clbuild &co. Add a noisy message to the end of the build
so people will hopefully notice.
* Remove OpenMCL and Clisp examples from make.sh help
string. Builders who need them should be able to figure them
out. From the SBCL and CMUCL examples, I think -- and this way they
won't go stale...
* Also check for empty arguments to --foo= style command line options.
Based on patches by Daniel Herring:
* Simple --option and --option=arg command-line parser in make.sh.
* Supported options:
** --xc-host=<command> to specify XC host option instead of a
positional argument. (Incompatible change!)
** --prefix=<path> to specify a non-standard install location for
both build and install.sh.
Addresses https://bugs.launchpad.net/sbcl/+bug/550889
** --help
Semi-related minor cleanup:
* Use --no-userinit and --no-sysinit instead of version.lisp-expr as
the default inits for self-building: they have been around long
enough now that it should not stop anyone from building, and makes
for a somewhat less magical looking "//Build options: ..." line in
the build log.
On Win32, the default cross-compilation host is SBCL with a --sysinit
NUL --userinit NUL. Unfortunately, SBCL itself doesn't recognize NUL
as a valid filename as it's actually a DOS device name and there's a
separate API to check for them. The least losing workaround is to use
a real file with known-harmless content for userinit and sysinit, and
the simplest choice is version.lisp-expr. This changes makes it
possible to build on Win32 without specifying a host lisp.
* when the LOAD-TYPE macros in the various backends hardcoded '3',
they really meant (1- N-WORD-BYTES)--a little reflection on
widetags, lowtags, and endian orderings should make this clear
(we don't have a 64-bit big-endian port to drive it home, though);
* catch the spread of magic constants in code/array.lisp.
new toplevel options --no-sysinit, --no-userinit to inhibit
loading the corresponding init files
... also fixes the win32 build failure that motivated this change
Merge patch from James Bielman fixing self-build under Win32.
... a little bit of an accident ensued; I ran
canonicalize-whitespace on .sh files, which seemed to
work (except on wc.sh) until it scribbled all over
make.sh, confusing the shell interpreter utterly.
... the resulting files have built the system, nevertheless.
MORE POLICY
... upgrade asdf to upstream HEAD
... make canonicalize-whitespace-1 not touch the file if it
doesn't need touching
... automatically run canonicalize-whitespace as part of make.sh
(this is potentially controversial, as it takes a
non-trivial amount of time, and also potentially
scribbles over files which the unwary developer has
open. Better, automatic solutions are still being
sought)
* print the cell name for CELL-ERRORs when *PRINT-ESCAPE* is true.
* print just the filename, not the SHARED-OBJECT structure for failed
LOAD-SHARED-OBJECT.
* improve our Darwin dlerror(3)-shim reporting; also clean up warnings from
ppc-darwin-dlsim.c and reindent it for 80 columns.
* move reporting of failed contribs to make-target-contrib.sh, and re-add
--disable-debugger, which had accidentally fallen off.
* COERCE for objects other than numbers and characters is not
foldable (fix a bug reported by Nikodemus Siivola).
* Set LC_ALL to "C" when building SBCL.
* Set locale to "C" in run-tests.sh.
* Merge sbcl-devel "Unneeded REX prefixes on x86-64"
(Lutz Euler, 2005-05-17)
* Merge sbcl-devel " x86-64 fp exceptions" (James Knight,
2005-05-17)
* Add "--userinit /dev/null --sysinit /dev/null" to the
default SBCL_XC_HOST.
* Clean up some stale x86 code (mostly floating point related)
in the x86-64 port.
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
First stab at fixing bug #7. To get output approximately as
verbose as the old behaviour use :TOP-LEVEL-FORMS as the
value of the :PRINT option to COMPILE-FILE.
Note: Giving users control over the way things are printed
via *COMPILER-PRINT-VARIABLE-ALIST* is OTOH a good thing,
but it also seems to be used for ratheer diverse things,
and people could reasonably want to customize them
separately. Gah.
Also list x86/FreeBSD4 as "expected to pass tests" in
make.sh output, as that seems to be the case.
* x86/FreeBSD, x86/Linux and Sparc/SunOS now have
linkage-table support, allowing SAVE-LISP-AND-DIE to
function properly in the presence of loaded shared
objects.
* As a related cleanup automate testing for dlopen
support on the plaform, and conditionalize
LOAD-SHARED-OBJECT support on the resulting
:os-provides-dlopen feature.