... |
... |
@@ -12,13 +12,13 @@ General Requirements |
12
|
12
|
|
13
|
13
|
In order to build CMU CL, you will need:
|
14
|
14
|
|
15
|
|
-a. A working CMU CL binary. There is no way around this requirement!
|
|
15
|
+1. A working CMU CL binary. There is no way around this requirement!
|
16
|
16
|
|
17
|
17
|
This binary can either be for the platform you want to target, in
|
18
|
18
|
that case you can either recompile or cross-compile, or for another
|
19
|
19
|
supported platform, in that case you must cross-compile, obviously.
|
20
|
20
|
|
21
|
|
-a. A supported C compiler for the C runtime code.
|
|
21
|
+1. A supported C compiler for the C runtime code.
|
22
|
22
|
|
23
|
23
|
Most of the time, this means GNU gcc, though for some ports it
|
24
|
24
|
means the vendor-supplied C compiler. The compiler must be
|
... |
... |
@@ -27,13 +27,13 @@ a. A supported C compiler for the C runtime code. |
27
|
27
|
Note for FreeBSD 10 and above: The build requires gcc (Clang will
|
28
|
28
|
not work) and the lib32 compatiblity package.
|
29
|
29
|
|
30
|
|
-a. GNU make
|
|
30
|
+1. GNU make
|
31
|
31
|
|
32
|
32
|
This has to be available either as gmake or make in your PATH, or
|
33
|
33
|
the MAKE environment variable has to be set to point to the correct
|
34
|
34
|
binary.
|
35
|
35
|
|
36
|
|
-a. The CMU CL source code
|
|
36
|
+1. The CMU CL source code
|
37
|
37
|
|
38
|
38
|
Here you can either use one of the release source tarballs, or
|
39
|
39
|
check out the source code directly from the public CMUCL git
|
... |
... |
@@ -51,14 +51,14 @@ Setting up a build environment |
51
|
51
|
|
52
|
52
|
mkdir cmucl ; cd cmucl
|
53
|
53
|
|
54
|
|
-2.) Fetch the sources and put them into the base directory
|
55
|
|
-
|
|
54
|
+2. Fetch the sources and put them into the base directory
|
|
55
|
+```
|
56
|
56
|
tar xzf /tmp/cmucl-source.tar.gz
|
57
|
|
-
|
|
57
|
+```
|
58
|
58
|
or, if you want to use the git sources directly:
|
59
|
|
-
|
|
59
|
+```
|
60
|
60
|
git clone https://gitlab.common-lisp.net/cmucl/cmucl.git
|
61
|
|
-
|
|
61
|
+```
|
62
|
62
|
Whatever you do, the sources must be in a directory named src
|
63
|
63
|
inside the base directory. Since the build tools keep all
|
64
|
64
|
generated files in separate target directories, the src directory
|
... |
... |
@@ -247,195 +247,195 @@ Overview of the included build scripts |
247
|
247
|
|
248
|
248
|
* bin/build.sh [-123obvuBCU?]
|
249
|
249
|
|
250
|
|
-This is the main build script. It essentially calls the other build
|
251
|
|
-scripts described below in the proper sequence to build cmucl from an
|
252
|
|
-existing binary of cmucl.
|
|
250
|
+ This is the main build script. It essentially calls the other build
|
|
251
|
+ scripts described below in the proper sequence to build cmucl from an
|
|
252
|
+ existing binary of cmucl.
|
253
|
253
|
|
254
|
254
|
* bin/create-target.sh target-directory [lisp-variant [motif-variant]]
|
255
|
255
|
|
256
|
|
-This script creates a new target directory, which is a shadow of the
|
257
|
|
-source directory, that will contain all the files that are created by
|
258
|
|
-the build process. Thus, each target's files are completely separate
|
259
|
|
-from the src directory, which could, in fact, be read-only. Hence you
|
260
|
|
-can simultaneously build CMUCL for different targets from the same
|
261
|
|
-source directory.
|
262
|
|
-
|
263
|
|
-The first argument is the name of the target directory to create. The
|
264
|
|
-remaining arguments are optional. If they are not given, the script
|
265
|
|
-tries to determine the lisp variant and motif variant from the system
|
266
|
|
-the script is running on.
|
267
|
|
-
|
268
|
|
-The lisp-variant (i.e. the suffix of the src/lisp/Config.* to use as
|
269
|
|
-the target's Config file), and optionally the motif-variant (again the
|
270
|
|
-suffix of the src/motif/server/Config.* file to use as the Config file
|
271
|
|
-for the target's CMUCL/Motif server code). If the lisp-variant is
|
272
|
|
-given but the motif-variant is not, the motif-variant is determined
|
273
|
|
-from the lisp-variant.
|
274
|
|
-
|
275
|
|
-The script will generate the target directory tree, link the relevant
|
276
|
|
-Config files, and generate place-holder files for various files, in
|
277
|
|
-order to ensure proper operation of the other build-scripts. It also
|
278
|
|
-creates a sample setenv.lisp file in the target directory, which is
|
279
|
|
-used by the build and load processes to set up the correct list of
|
280
|
|
-*features* for your target lisp core.
|
281
|
|
-
|
282
|
|
-IMPORTANT: You will normally NOT have to modify the sample setenv.lisp
|
283
|
|
-file, if you are building from a binary that has the desired features.
|
284
|
|
-In fact, the sample has all code commented out, If you want to add or
|
285
|
|
-remove features, you need to include code that puts at least a minimal
|
286
|
|
-set of features onto the list (use PUSHNEW and/or REMOVE). You can
|
287
|
|
-use the current set of *features* of your lisp as a first guide. The
|
288
|
|
-sample setenv.lisp includes a set of features that should work for the
|
289
|
|
-intended configuration. Note also that some adding or removing some
|
290
|
|
-features may require a cross-compile instead of a normal compile.
|
|
256
|
+ This script creates a new target directory, which is a shadow of the
|
|
257
|
+ source directory, that will contain all the files that are created by
|
|
258
|
+ the build process. Thus, each target's files are completely separate
|
|
259
|
+ from the src directory, which could, in fact, be read-only. Hence you
|
|
260
|
+ can simultaneously build CMUCL for different targets from the same
|
|
261
|
+ source directory.
|
|
262
|
+
|
|
263
|
+ The first argument is the name of the target directory to create. The
|
|
264
|
+ remaining arguments are optional. If they are not given, the script
|
|
265
|
+ tries to determine the lisp variant and motif variant from the system
|
|
266
|
+ the script is running on.
|
|
267
|
+
|
|
268
|
+ The lisp-variant (i.e. the suffix of the src/lisp/Config.* to use as
|
|
269
|
+ the target's Config file), and optionally the motif-variant (again the
|
|
270
|
+ suffix of the src/motif/server/Config.* file to use as the Config file
|
|
271
|
+ for the target's CMUCL/Motif server code). If the lisp-variant is
|
|
272
|
+ given but the motif-variant is not, the motif-variant is determined
|
|
273
|
+ from the lisp-variant.
|
|
274
|
+
|
|
275
|
+ The script will generate the target directory tree, link the relevant
|
|
276
|
+ Config files, and generate place-holder files for various files, in
|
|
277
|
+ order to ensure proper operation of the other build-scripts. It also
|
|
278
|
+ creates a sample setenv.lisp file in the target directory, which is
|
|
279
|
+ used by the build and load processes to set up the correct list of
|
|
280
|
+ *features* for your target lisp core.
|
|
281
|
+
|
|
282
|
+ IMPORTANT: You will normally NOT have to modify the sample setenv.lisp
|
|
283
|
+ file, if you are building from a binary that has the desired features.
|
|
284
|
+ In fact, the sample has all code commented out, If you want to add or
|
|
285
|
+ remove features, you need to include code that puts at least a minimal
|
|
286
|
+ set of features onto the list (use PUSHNEW and/or REMOVE). You can
|
|
287
|
+ use the current set of *features* of your lisp as a first guide. The
|
|
288
|
+ sample setenv.lisp includes a set of features that should work for the
|
|
289
|
+ intended configuration. Note also that some adding or removing some
|
|
290
|
+ features may require a cross-compile instead of a normal compile.
|
291
|
291
|
|
292
|
292
|
* bin/clean-target.sh [-l] target-directory [more dirs]
|
293
|
293
|
|
294
|
|
-Cleans the given target directory, so that all created files will be
|
295
|
|
-removed. This is useful to force recompilation. If the -l flag is
|
296
|
|
-given, then the C runtime is also removed, including all the lisp
|
297
|
|
-executable, any lisp cores, all object files, lisp.nm, internals.h,
|
298
|
|
-and the config file.
|
|
294
|
+ Cleans the given target directory, so that all created files will be
|
|
295
|
+ removed. This is useful to force recompilation. If the -l flag is
|
|
296
|
+ given, then the C runtime is also removed, including all the lisp
|
|
297
|
+ executable, any lisp cores, all object files, lisp.nm, internals.h,
|
|
298
|
+ and the config file.
|
299
|
299
|
|
300
|
300
|
* bin/build-world.sh target-directory [build-binary] [build-flags...]
|
301
|
301
|
|
302
|
|
-Starts a complete world build for the given target, using the lisp
|
303
|
|
-binary/core specified as a build host. The recompilation step will
|
304
|
|
-only recompile changed files, or files for which the fasl files are
|
305
|
|
-missing. It will also not recompile the C runtime code (the lisp
|
306
|
|
-binary). If a (re)compilation of that code is needed, the genesis
|
307
|
|
-step of the world build will inform you of that fact. In that case,
|
308
|
|
-you'll have to use the rebuild-lisp.sh script, and then restart the
|
309
|
|
-world build process with build-world.sh
|
|
302
|
+ Starts a complete world build for the given target, using the lisp
|
|
303
|
+ binary/core specified as a build host. The recompilation step will
|
|
304
|
+ only recompile changed files, or files for which the fasl files are
|
|
305
|
+ missing. It will also not recompile the C runtime code (the lisp
|
|
306
|
+ binary). If a (re)compilation of that code is needed, the genesis
|
|
307
|
+ step of the world build will inform you of that fact. In that case,
|
|
308
|
+ you'll have to use the rebuild-lisp.sh script, and then restart the
|
|
309
|
+ world build process with build-world.sh
|
310
|
310
|
|
311
|
311
|
* bin/rebuild-lisp.sh target-directory
|
312
|
312
|
|
313
|
|
-This script will force a complete recompilation of the C runtime code
|
314
|
|
-of CMU CL (aka the lisp executable). Doing this will necessitate
|
315
|
|
-building a new kernel.core file, using build-world.sh.
|
|
313
|
+ This script will force a complete recompilation of the C runtime code
|
|
314
|
+ of CMU CL (aka the lisp executable). Doing this will necessitate
|
|
315
|
+ building a new kernel.core file, using build-world.sh.
|
316
|
316
|
|
317
|
317
|
* bin/load-world.sh target-directory version
|
318
|
318
|
|
319
|
|
-This will finish the CMU CL rebuilding process, by loading the
|
320
|
|
-remaining compiled files generated in the world build process into the
|
321
|
|
-kernel.core file, that also resulted from that process, creating the
|
322
|
|
-final lisp.core file.
|
|
319
|
+ This will finish the CMU CL rebuilding process, by loading the
|
|
320
|
+ remaining compiled files generated in the world build process into the
|
|
321
|
+ kernel.core file, that also resulted from that process, creating the
|
|
322
|
+ final lisp.core file.
|
323
|
323
|
|
324
|
|
-You have to pass the version string as a second argument. The dumped
|
325
|
|
-core will anounce itself using that string. Please don't use a string
|
326
|
|
-consisting of an official release name only, (e.g. "18d"), since those
|
327
|
|
-are reserved for official release builds. Including the build-date in
|
328
|
|
-ISO8601 format is often a good idea, e.g. "18d+ 2002-05-06" for a
|
329
|
|
-binary that is based on sources current on the 6th May, 2002, which is
|
330
|
|
-post the 18d release.
|
|
324
|
+ You have to pass the version string as a second argument. The dumped
|
|
325
|
+ core will anounce itself using that string. Please don't use a string
|
|
326
|
+ consisting of an official release name only, (e.g. "18d"), since those
|
|
327
|
+ are reserved for official release builds. Including the build-date in
|
|
328
|
+ ISO8601 format is often a good idea, e.g. "18d+ 2002-05-06" for a
|
|
329
|
+ binary that is based on sources current on the 6th May, 2002, which is
|
|
330
|
+ post the 18d release.
|
331
|
331
|
|
332
|
332
|
* bin/build-utils.sh target-directory
|
333
|
333
|
|
334
|
|
-This script will build auxiliary libraries packaged with CMU CL,
|
335
|
|
-including CLX, CMUCL/Motif, the Motif debugger, inspector, and control
|
336
|
|
-panel, and the Hemlock editor. It will use the lisp executable and
|
337
|
|
-core of the given target.
|
|
334
|
+ This script will build auxiliary libraries packaged with CMU CL,
|
|
335
|
+ including CLX, CMUCL/Motif, the Motif debugger, inspector, and control
|
|
336
|
+ panel, and the Hemlock editor. It will use the lisp executable and
|
|
337
|
+ core of the given target.
|
338
|
338
|
|
339
|
|
-Note: To build with Motif (clm), you need to have the Motif libraries
|
340
|
|
-available and headers available to build motifd, the clm Motif server.
|
341
|
|
-OpenMotif is known to work.
|
|
339
|
+ Note: To build with Motif (clm), you need to have the Motif libraries
|
|
340
|
+ available and headers available to build motifd, the clm Motif server.
|
|
341
|
+ OpenMotif is known to work.
|
342
|
342
|
|
343
|
|
-You may need to adjust the include paths and library paths in
|
344
|
|
-src/motif/server/Config.* to match where Motif is installed if the
|
345
|
|
-paths therein are incorrect.
|
|
343
|
+ You may need to adjust the include paths and library paths in
|
|
344
|
+ src/motif/server/Config.* to match where Motif is installed if the
|
|
345
|
+ paths therein are incorrect.
|
346
|
346
|
|
347
|
|
-Unless you intend to use clm and motifd, you can safely ignore the
|
348
|
|
-build failure. Everything else will have been compiled correctly; you
|
349
|
|
-just can't use clm.
|
|
347
|
+ Unless you intend to use clm and motifd, you can safely ignore the
|
|
348
|
+ build failure. Everything else will have been compiled correctly; you
|
|
349
|
+ just can't use clm.
|
350
|
350
|
|
351
|
351
|
* bin/make-dist.sh [-bg] [-G group] [-O owner] target-directory version arch os
|
352
|
352
|
|
353
|
|
-This script creates both main and extra distribution tarballs from the
|
354
|
|
-given target directory, using the make-main-dist.sh and
|
355
|
|
-make-extra-dist.sh scripts. The result will be two tar files. One
|
356
|
|
-contains the main distribution including the runtime and lisp.core
|
357
|
|
-with PCL (CLOS); the second contains the extra libraries such as
|
358
|
|
-Gray-streams, simple-streams, CLX, CLM, and Hemlock.
|
359
|
|
-
|
360
|
|
-Some options that are available:
|
361
|
|
-
|
362
|
|
- -b Use bzip2 compression
|
363
|
|
- -g Use gzip compression
|
364
|
|
- -G group Group to use
|
365
|
|
- -O owner Owner to use
|
366
|
|
-
|
367
|
|
-If you specify both -b and -g, you will get two sets of tarfiles. The
|
368
|
|
--G and -O options will attempt to set the owner and group of the files
|
369
|
|
-when building the tarfiles. This way, when you extract the tarfiles,
|
370
|
|
-the owner and group will be set as specified. You may need to be root
|
371
|
|
-to do this because many Unix systems don't normally let you change the
|
372
|
|
-owner and group of a file.
|
373
|
|
-
|
374
|
|
-The remaining arguments used to create the name of the tarfiles. The
|
375
|
|
-names will have the form:
|
376
|
|
-
|
|
353
|
+ This script creates both main and extra distribution tarballs from the
|
|
354
|
+ given target directory, using the make-main-dist.sh and
|
|
355
|
+ make-extra-dist.sh scripts. The result will be two tar files. One
|
|
356
|
+ contains the main distribution including the runtime and lisp.core
|
|
357
|
+ with PCL (CLOS); the second contains the extra libraries such as
|
|
358
|
+ Gray-streams, simple-streams, CLX, CLM, and Hemlock.
|
|
359
|
+
|
|
360
|
+ Some options that are available:
|
|
361
|
+
|
|
362
|
+ -b Use bzip2 compression
|
|
363
|
+ -g Use gzip compression
|
|
364
|
+ -G group Group to use
|
|
365
|
+ -O owner Owner to use
|
|
366
|
+
|
|
367
|
+ If you specify both -b and -g, you will get two sets of tarfiles. The
|
|
368
|
+ -G and -O options will attempt to set the owner and group of the files
|
|
369
|
+ when building the tarfiles. This way, when you extract the tarfiles,
|
|
370
|
+ the owner and group will be set as specified. You may need to be root
|
|
371
|
+ to do this because many Unix systems don't normally let you change the
|
|
372
|
+ owner and group of a file.
|
|
373
|
+
|
|
374
|
+ The remaining arguments used to create the name of the tarfiles. The
|
|
375
|
+ names will have the form:
|
|
376
|
+```
|
377
|
377
|
cmucl-<version>-<arch>-<os>.tar.bz2
|
378
|
378
|
cmucl-<version>-<arch>-<os>.extras.tar.bz2
|
379
|
|
-
|
380
|
|
-Of course, the "bz2" will be "gz" if you specified gzip compression
|
381
|
|
-instead of bzip.
|
|
379
|
+```
|
|
380
|
+ Of course, the "bz2" will be "gz" if you specified gzip compression
|
|
381
|
+ instead of bzip.
|
382
|
382
|
|
383
|
383
|
* /bin/make-main-dist.sh target-directory version arch os
|
384
|
384
|
|
385
|
|
-This is script is not normally invoked by the user; make-dist will do
|
386
|
|
-it appropriately.
|
|
385
|
+ This is script is not normally invoked by the user; make-dist will do
|
|
386
|
+ it appropriately.
|
387
|
387
|
|
388
|
|
-This script creates a main distribution tarball (both in gzipped and
|
389
|
|
-bzipped variants) from the given target directory. This will include
|
390
|
|
-all the stuff that is normally included in official release tarballs
|
391
|
|
-such as lisp.core and the PCL libraries, including Gray streams and
|
392
|
|
-simple streams.
|
|
388
|
+ This script creates a main distribution tarball (both in gzipped and
|
|
389
|
+ bzipped variants) from the given target directory. This will include
|
|
390
|
+ all the stuff that is normally included in official release tarballs
|
|
391
|
+ such as lisp.core and the PCL libraries, including Gray streams and
|
|
392
|
+ simple streams.
|
393
|
393
|
|
394
|
|
-This is intended to be run from make-dist.sh.
|
|
394
|
+ This is intended to be run from make-dist.sh.
|
395
|
395
|
|
396
|
396
|
* bin/make-extra-dist.sh target-directory version arch os
|
397
|
397
|
|
398
|
|
-This is script is not normally invoked by the user; make-dist will do
|
399
|
|
-it appropriately.
|
|
398
|
+ This is script is not normally invoked by the user; make-dist will do
|
|
399
|
+ it appropriately.
|
400
|
400
|
|
401
|
|
-This script creates an extra distribution tarball (both in gzipped and
|
402
|
|
-bzipped variants) from the given target directory. This will include
|
403
|
|
-all the stuff that is normally included in official extra release
|
404
|
|
-tarballs, i.e. the auxiliary libraries such as CLX, CLM, and Hemlock.
|
|
401
|
+ This script creates an extra distribution tarball (both in gzipped and
|
|
402
|
+ bzipped variants) from the given target directory. This will include
|
|
403
|
+ all the stuff that is normally included in official extra release
|
|
404
|
+ tarballs, i.e. the auxiliary libraries such as CLX, CLM, and Hemlock.
|
405
|
405
|
|
406
|
|
-This is intended to be run from make-dist.sh.
|
|
406
|
+ This is intended to be run from make-dist.sh.
|
407
|
407
|
|
408
|
408
|
|
409
|
409
|
* cross-build-world.sh target-directory cross-directory cross-script
|
410
|
410
|
[build-binary] [build-flags...]
|
411
|
411
|
|
412
|
|
-This is a script that can be used instead of build-world.sh for
|
413
|
|
-cross-compiling CMUCL. In addition to the arguments of build-world.sh
|
414
|
|
-it takes two further required arguments: The name of a directory that
|
415
|
|
-will contain the cross-compiler backend (the directory is created if
|
416
|
|
-it doesn't exist, and must not be the same as the target-directory),
|
417
|
|
-and the name of a Lisp cross-compilation script, which is responsible
|
418
|
|
-for setting up, compiling, and loading the cross-compiler backend.
|
419
|
|
-The latter argument is needed because each host/target combination of
|
420
|
|
-platform's needs slightly different code to produce a working
|
421
|
|
-cross-compiler.
|
422
|
|
-
|
423
|
|
-We include a number of working examples of cross-compiler scripts in
|
424
|
|
-the cross-scripts directory. You'll have to edit the features section
|
425
|
|
-of the given scripts, to specify the features that should be removed
|
426
|
|
-from the current set of features in the host lisp, and those that
|
427
|
|
-should be added, so that the backend features are correct for the
|
428
|
|
-intended target.
|
429
|
|
-
|
430
|
|
-You can look at Eric Marsden's collection of build scripts for the
|
431
|
|
-basis of more cross-compiler scripts.
|
|
412
|
+ This is a script that can be used instead of build-world.sh for
|
|
413
|
+ cross-compiling CMUCL. In addition to the arguments of build-world.sh
|
|
414
|
+ it takes two further required arguments: The name of a directory that
|
|
415
|
+ will contain the cross-compiler backend (the directory is created if
|
|
416
|
+ it doesn't exist, and must not be the same as the target-directory),
|
|
417
|
+ and the name of a Lisp cross-compilation script, which is responsible
|
|
418
|
+ for setting up, compiling, and loading the cross-compiler backend.
|
|
419
|
+ The latter argument is needed because each host/target combination of
|
|
420
|
+ platform's needs slightly different code to produce a working
|
|
421
|
+ cross-compiler.
|
|
422
|
+
|
|
423
|
+ We include a number of working examples of cross-compiler scripts in
|
|
424
|
+ the cross-scripts directory. You'll have to edit the features section
|
|
425
|
+ of the given scripts, to specify the features that should be removed
|
|
426
|
+ from the current set of features in the host lisp, and those that
|
|
427
|
+ should be added, so that the backend features are correct for the
|
|
428
|
+ intended target.
|
|
429
|
+
|
|
430
|
+ You can look at Eric Marsden's collection of build scripts for the
|
|
431
|
+ basis of more cross-compiler scripts.
|
432
|
432
|
|
433
|
433
|
Step-by-Step Example of recompiling CMUCL for OpenBSD
|
434
|
434
|
-----------------------------------------------------
|
435
|
435
|
|
436
|
436
|
Set up everything as described in the setup section above. Then
|
437
|
437
|
execute:
|
438
|
|
-
|
|
438
|
+```
|
439
|
439
|
# Create a new target directory structure/config for OpenBSD:
|
440
|
440
|
bin/create-target.sh openbsd OpenBSD_gencgc OpenBSD
|
441
|
441
|
|
... |
... |
@@ -487,10 +487,12 @@ bin/load-world.sh openbsd "18d+ 2002-05-06" |
487
|
487
|
# core will announce. Please always put the build-date and some
|
488
|
488
|
# other information in there, to make it possible to differentiate
|
489
|
489
|
# those builds from official builds, which only contain the release.
|
|
490
|
+```
|
490
|
491
|
|
491
|
492
|
Now you should have a new lisp.core, which you can start with
|
492
|
|
-
|
|
493
|
+```
|
493
|
494
|
./openbsd/lisp/lisp -core ./openbsd/lisp/lisp.core -noinit -nositeinit
|
|
495
|
+```
|
494
|
496
|
|
495
|
497
|
Compiling sources that contain disruptive changes
|
496
|
498
|
-------------------------------------------------
|