diff --git a/Makefile b/Makefile index 752ea73804..9ce2e606aa 100644 --- a/Makefile +++ b/Makefile @@ -246,7 +246,7 @@ native-for-cross: cd racket/src/build/cross; $(MAKE) reconfigure MORE_CONFIGURE_ARGS="$(MORE_CROSS_CONFIGURE_ARGS)" cd racket/src/build/cross/racket; $(MAKE) -racket/src/build/cross/Makefile: racket/src/configure racket/src/cfg-racket racket/src/Makefile.in +racket/src/build/cross/Makefile: racket/src/configure racket/src/cfg-bc racket/src/Makefile.in cd racket/src/build/cross; ../../configure $(MORE_CROSS_CONFIGURE_ARGS) # ------------------------------------------------------------ diff --git a/build.md b/build.md index a9247f93fb..e5d652e6af 100644 --- a/build.md +++ b/build.md @@ -229,25 +229,24 @@ below. The `make cs` target (or `make cs-as-is` for a rebuild, or `nmake win32-cs` on Windows with Visual Studio) builds a variant of Racket that -runs on Chez Scheme. By default, the executables for the Racket-on-Chez -variant all have a `cs` or `CS` suffix, and they coexist with a -traditional Racket build by keeping compiled files in a machine-specific -subdirectory of the `"compiled"` directory. You can remove the `cs` -suffix and the subdirectory in `"compiled"` by providing -`RACKETCS_SUFFIX=""` to `make`. (One day, the default for -`RACKETCS_SUFFIX` will change from `"cs"` to `""`.) +runs on Chez Scheme. By default, the executables for the Racket CS +variant all have a `cs` or `CS` suffix, and they coexist with a Racket +BC build by keeping compiled files in a machine-specific subdirectory of +the `"compiled"` directory. You can remove the `cs` suffix and the +subdirectory in `"compiled"` by providing `RACKETCS_SUFFIX=""` to +`make`. (One day, the default for `RACKETCS_SUFFIX` will change from +`"cs"` to `""`.) -Building Racket on Chez Scheme requires either an existing Racket or pb -(portable bytecode) boot files for Chez Scheme. By default, pb bootf -iles are downloaded from a separate Git repository by `make cs`. If you -have Racket v7.1 or later, then you can choose instead to bootstrap -using that Racket implementation with +Building Racket CS requires either an existing Racket or pb (portable +bytecode) boot files for Chez Scheme. By default, pb boot files are +downloaded from a separate Git repository by `make cs`. If you have +Racket v7.1 or later, then you can choose instead to bootstrap using +that Racket implementation with   `make cs RACKET=racket` -Use `make both` to build both traditional Racket and Racket on Chez -Scheme, where packages are updated and documentation is built only once -(using traditional Racket). +Use `make both` to build both Racket BC and Racket CS, where packages +are updated and documentation is built only once (using Racket BC). ### 1.7. Even More Instructions: Building Racket Pieces diff --git a/pkgs/racket-build-guide/build.scrbl b/pkgs/racket-build-guide/build.scrbl index 1fc04c9398..414a17dfce 100644 --- a/pkgs/racket-build-guide/build.scrbl +++ b/pkgs/racket-build-guide/build.scrbl @@ -210,8 +210,8 @@ If you need even more control over the build, carry on to The @exec{make cs} target (or @exec{make cs-as-is} for a rebuild, or @exec{nmake win32-cs} on Windows with Visual Studio) builds a variant of Racket that runs on Chez Scheme. By default, the executables for -the Racket-on-Chez variant all have a @litchar{cs} or @litchar{CS} -suffix, and they coexist with a traditional Racket build by keeping +the Racket CS variant all have a @litchar{cs} or @litchar{CS} +suffix, and they coexist with a Racket BC build by keeping compiled files in a machine-specific subdirectory of the @filepath{compiled} directory. You can remove the @litchar{cs} suffix and the subdirectory in @filepath{compiled} by providing @@ -219,17 +219,17 @@ and the subdirectory in @filepath{compiled} by providing the default for @exec{RACKETCS_SUFFIX} will change from @tt{"cs"} to @tt{""}.) -Building Racket on Chez Scheme requires either an existing Racket or -pb (portable bytecode) boot files for Chez Scheme. By default, pb -bootf iles are downloaded from a separate Git repository by @exec{make -cs}. If you have Racket v7.1 or later, then you can choose instead -to bootstrap using that Racket implementation with +Building Racket CS requires either an existing Racket or pb (portable +bytecode) boot files for Chez Scheme. By default, pb boot files are +downloaded from a separate Git repository by @exec{make cs}. If you +have Racket v7.1 or later, then you can choose instead to bootstrap +using that Racket implementation with @commandline{make cs RACKET=racket} -Use @exec{make both} to build both traditional Racket and Racket on -Chez Scheme, where packages are updated and documentation is built only -once (using traditional Racket). +Use @exec{make both} to build both Racket BC and Racket CS, where +packages are updated and documentation is built only once (using +Racket BC). @; ------------------------------------------------------------ diff --git a/racket/src/LICENSE.txt b/racket/src/LICENSE.txt index ae815ead68..b657c98df8 100644 --- a/racket/src/LICENSE.txt +++ b/racket/src/LICENSE.txt @@ -2,13 +2,14 @@ Racket is distributed under the MIT license and the Apache version 2.0 license, at your option. However, the Racket runtime system includes components distributed under other licenses. In short: - * The traditional Racket runtime system includes code distributed - under the GNU Lesser General Public License, version 3. This - runtime system is built from code in racket/src/racket. + * The Racket CS runtime system embeds Chez Scheme, which is + distributed under the Apache version 2.0 license. This runtime + system is built from code in racket/src/cs and + racket/src/ChezScheme. - * The Racket on Chez Scheme runtime system embeds Chez Scheme, which - is distributed under the Apache version 2.0 license. This runtime - system is built from code in racket/src/cs. + * The Racket BC runtime system includes code distributed under the + GNU Lesser General Public License, version 3. This runtime system + is built from code in racket/src/racket. Except for Windows executables that are created with the "embed DLLs" option, the runtime system remains separate as a shared library or @@ -38,7 +39,7 @@ The following are used in all Racket executables: rktio/rktio_sha2.c. mbed TLS is licensed under the Apache v2.0 License. -The following are used only in the traditional Racket executable: +The following are used only in the Racket BC executable: * libscheme. Code from libscheme can be found in racket. See the file LICENSE-libscheme.txt diff --git a/racket/src/README.txt b/racket/src/README.txt index b4b03dcdd7..8b353b4776 100644 --- a/racket/src/README.txt +++ b/racket/src/README.txt @@ -26,66 +26,48 @@ Report bugs: ======================================================================== - Traditional Racket versus Racket-on-Chez + Racket BC (ByteCode / Before Chez) versus Racket CS (Chez Scheme) ======================================================================== This source directory contains implementations for two different -versions of Racket: the traditional implementation that is -substantially implemented in C, and an implementation that builds on -Chez Scheme. +versions of Racket: the original BC implementation that is +substantially implemented in C, and the CS implementation that builds +on Chez Scheme. -Traditional Racket ------------------- +Racket BC +--------- -By default, `configure` and the Windows scripts build the traditional +By default, `configure` and the Windows scripts build the BC implementation of Racket. -If you need more information specific to the traditional -implementation of Racket, see "racket/README.txt". - -Racket on Chez Scheme ---------------------- - -To build Racket-on-Chez on Unix variants or Mac OS: - - * ... in addition to the traditional variant of Racket: supply - `--enable-cs` or `--enable-csdefault` to `configure`. - - The generated Racket-on-Chez executables will have a "cs" suffix - for `--enable-cs`, and it will not have a "cs" suffix for - `--enable-csdefault`. Also, plain `make` will still build the - traditional Racket implementation with `--enable-cs`; use `make cs` - to build and `make install-cs` to install. With - `--enable-csdefault`, plain `make` and `make install` will build - and install Racket-on-Chez. - - * ... by itself: supply `--enable-csonly` to `configure`. - - The generated Racket-on-Chez executables will *not* have a "cs" - suffix. Unlike `--enable-csdefault`, you must specify an existing - Racket using `--enable-racket=...`. - -Chez Scheme is included in a Racket source distribution and -`configure` detects that source, so no separate download or Git -checkout is needed in that case. - -Chez Scheme is not included in the Racket Git repository. Building -Racket-on-Chez from a Git checkout requires a "ChezScheme" build -checkout within the build directory or at at an alternate location -specified by the `--enable-scheme=...` argument to `configure`. - -Use the patched version of Chez Scheme at - - https://github.com/racket/ChezScheme - -We hope to eventually return to the current development version from - - https://github.com/cisco/ChezScheme - -To build Racket-on-Chez on Windows, see See "worksp\README.txt" for +To build Racket BC on Windows, see See "worksp\README.txt" for information. -If you need more information specific to Racket-on-Chez, see +If you need more information specific to Racket BC, see +"racket/README.txt". + +Racket CS +--------- + +To build Racket CS on Unix variants or Mac OS: + + * ... in addition Racket BC: supply `--enable-cs` to `configure`. + + The generated Racket CS executables will have a "cs" suffix. Also, + plain `make` will still build Racket BC with `--enable-cs`; use + `make cs` to build and `make install-cs` to install. + + * ... by itself: supply `--enable-csdefault` to `configure`. + + The generated Racket CS executables will *not* have a "cs" suffix. + +Chez Scheme is included in Racket source distributions and the source +repository. + +To build Racket CS on Windows, see See "worksp\README.txt" for +information. + +If you need more information specific to Racket CS, see "cs/README.txt". @@ -113,11 +95,11 @@ Quick instructions: you don't anticipate updating/rebuilding, but it will be harder to restart from scratch should you need to. - Some build modes may require GNU `make`. For example, when building - the traditional Racket implementation, the content of the "foreign" - subdirectory requires GNU `make` if no installed "libffi" is - detected. If the build fails with another variant of `make`, please - try using GNU `make`. + Some build modes may require GNU Make. For example, when building the + Racket CS implementation, GNU Make is required. When building the + Racket BC implementation, the content of the "foreign" subdirectory + requires GNU Make if no installed "libffi" is detected. If the build + fails with another variant of `make`, please try using GNU Make. Detailed instructions: @@ -358,9 +340,8 @@ Cross-compilation requires at least two flags to `configure`: * `--enable-racket=RACKET`, where RACKET is a path to a Racket executable that runs on the build platform; the executable must be - the same version of Racket and the same virtual machine (i.e., - traditional Racket or Racket on Chez Scheme) as being built for the - target platform. + the same version of Racket and the same virtual machine (i.e., CS + or BC) as being built for the target platform. This flag is needed because building and installing Racket requires running (an existing build of) Racket. @@ -377,7 +358,7 @@ For Racket-on-Chez, an additional flag is needed: current platform, and a cross-compiled Chez Scheme will be created in the same directory. -Some less commonly needed `configure` flags for traditional Racket: +Some less commonly needed `configure` flags for Racket BC: * `--enable-stackup`, if the target platform`s stack grows up. @@ -393,8 +374,8 @@ Some less commonly needed `configure` flags for traditional Racket: Cross-compiling for Android ======================================================================== -[Currently, cross-compilation for Android works only for the - traditional Racket implementation.] +[Currently, cross-compilation for Android works only for the Racket BC + implementation.] As an example of cross-compiling, to compile for Android on ARM using the NDK, use (all on one line) @@ -416,7 +397,7 @@ the [comp] of your choice and the [platform] used to compile. Cross-compiling for iOS ======================================================================== -[Currently, cross-compilation works only for the traditional Racket +[Currently, cross-compilation works only for the Racket BC implementation.] To compile the Racket runtime system as a Framework for iOS, use (all @@ -459,16 +440,16 @@ of the `racket` executable (and variants), while "../collects" contains the additional Racket libraries that are included in a minimal Racket distribution. -Sources for the traditional Racket implementation +Sources for the Racket BC implementation ------------------------------------------------- - * "racket" --- traditional `racket` executable + * "racket" --- `racket` BC executable This implementation can build from "scratch" with a C compiler, but first by building a CGC variant of Racket to transform the C sourses to build a (normal) 3m variant. - * "gracket" --- traditional `gracket` executable + * "gracket" --- `gracket` executable * "foreign" --- FFI implementation for "racket" @@ -482,13 +463,10 @@ Sources for the traditional Racket implementation See also the shared sources below, which includes rktio and the macro expander. -Sources for the Racket-on-Chez implementation ---------------------------------------------- +Sources for the Racket CS implementation +---------------------------------------- - * "cs" --- Racket-on-Chez `racket` executable - - Building requires both an existing Racket (possibly created from - the "racket" sources) and an existing Chez Scheme build. + * "cs" --- `racket` CS executable * "thread" --- thread scheduler @@ -508,13 +486,14 @@ Sources shared by both Racket implementations This expander is both included in Racket executables and used to expand itself for inclusion in executables. It's also used to - expand other libraries for inclusion in Racket-on-Chez executables. + expand other libraries for inclusion in Racket CS executables, but + already-expanded versions are included with source in + "cs/schemified". If you change the expander, run `make` in its directory to generate the "startup.inc" file that holds the expander's implementation for - the traditional Racket variant. The Racket-on-Chez build (which - needs an existing Racket to build, anyway) picks up changes to - "expander" automatically. + Racket BC. Also, run `make` in "cs" to rebuild expanded libraries + for Racket CS. * "rktio" --- portability layer for low-level I/O @@ -524,20 +503,19 @@ Sources shared by both Racket implementations * "schemify" --- a Racket-to-Scheme compiler, used by "cs" and "cify" - Similar to "expander", this layer is applied to itself and - other libraries for inclusion in "cs". - + Similar to "expander", this layer is applied to itself and other + libraries for inclusion in "cs". If you change it, be sure to run + `make` in "cs". * "cify" --- a Racket-to-C compiler - This compiler is used only when embedding the expander as C code, - instead of Racket bytecode, which is the default for platforms - where the traditional Racket JIT is not supported. + This compiler is used only when embedding the expander as C code in + Racket BC, instead of Racket bytecode, which is the default for + platforms where the Racket BC JIT is not supported. * "start" --- main-executable wrapper - Startup wrappers used by both the tradition and Racket-on-CS - implementations. + Startup wrappers used by both the Racket CS and BC implementations. * "worksp" --- Windows projects and build scripts @@ -564,4 +542,3 @@ More shared utilities * "lt" --- `libtool` and `configure` support * "utils" --- miscellaneous - diff --git a/racket/src/ac/make-configure b/racket/src/ac/make-configure index ecb3800ad6..bba0cb215a 100755 --- a/racket/src/ac/make-configure +++ b/racket/src/ac/make-configure @@ -2,7 +2,7 @@ #| cd "`dirname \"$0\"`" src="../racket/configure.ac" -tgt="../cfg-racket" +tgt="../cfg-bc" if [ ! -e "$src" ]; then echo "abort: did not find $src"; exit 1; fi echo "Creating $tgt from $src" autoconf "$src" | racket "$0" > "$tgt" diff --git a/racket/src/configure b/racket/src/configure index aa7b8a67c1..83b5f93e57 100755 --- a/racket/src/configure +++ b/racket/src/configure @@ -1,10 +1,9 @@ #! /bin/sh -# Using `--enable-csdefault` or `--enable-csonly` avoids running `cfg-racket` -# and only uses `cfg-cs` and `cs/c/configure`. +# Using `--enable-csdefault` or `--enable-csonly` avoids running +# `cfg-racket` and only uses `cfg-cs` and `cs/c/configure`. -# Using `--enable-cs` or `--enable-csdefault` uses -# both `cfg-racket` and `cs/c/configure`. +# Using `--enable-cs` uses both `cfg-racket` and `cs/c/configure`. set -e diff --git a/racket/src/cs/README.txt b/racket/src/cs/README.txt index 4db52398c4..59fb1b1adc 100644 --- a/racket/src/cs/README.txt +++ b/racket/src/cs/README.txt @@ -1,4 +1,4 @@ -