diff --git a/INSTALL.txt b/INSTALL.txt index f65d5c5d4a..7c389e522d 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -196,10 +196,14 @@ libraries. See the documentation for `raco setup' for information on the options. For cross compilation, add configuration options to -`CONFIGURE_ARGS_qq="..."' as described in the "README" of "racket/src", -but also add a `PLAIN_RACKET=...' argument for the top-level makefile -to specify the same executable as in an `--enable-racket=...' for -`configure'. +`CONFIGURE_ARGS_qq="..."' as described in the "README" of +"racket/src", but also add a `PLAIN_RACKET=...' argument for the +top-level makefile to specify the same executable as in an +`--enable-racket=...' for `configure'. In general, the `PLAIN_RACKET` +setting should have the form `PLAIN_RACKET="... -C"` to ensure that +cross-compilation mode is used and that any foreign libraries needed +for build time can be found, but many cross-compilation scenarios work +without `-C`. Installing Packages ------------------- diff --git a/Makefile b/Makefile index aea6d189b7..3604fc4d29 100644 --- a/Makefile +++ b/Makefile @@ -335,7 +335,7 @@ REMOTE_USER_AUTO = --catalog $(SVR_CAT) $(USER_AUTO_OPTIONS) REMOTE_INST_AUTO = --catalog $(SVR_CAT) --scope installation $(X_AUTO_OPTIONS) CONFIG_MODE_q = "$(CONFIG)" "$(CONFIG_MODE)" BUNDLE_CONFIG = bundle/racket/etc/config.rktd -BUNDLE_RACO_FLAGS = -C -G bundle/racket/etc -X bundle/racket/collects -A bundle/user -l raco +BUNDLE_RACO_FLAGS = -G bundle/racket/etc -X bundle/racket/collects -C -A bundle/user -l raco BUNDLE_RACO = $(PLAIN_RACKET) $(BUNDLE_RACO_FLAGS) WIN32_BUNDLE_RACO = $(WIN32_PLAIN_RACKET) $(BUNDLE_RACO_FLAGS) IN_BUNDLE_RACO = bundle/racket/bin/raco diff --git a/pkgs/racket-doc/scribblings/reference/startup.scrbl b/pkgs/racket-doc/scribblings/reference/startup.scrbl index 1b07c97c55..67ed1ae730 100644 --- a/pkgs/racket-doc/scribblings/reference/startup.scrbl +++ b/pkgs/racket-doc/scribblings/reference/startup.scrbl @@ -313,7 +313,9 @@ flags: @racket[(find-system-path 'config-dir)] and @racket[(find-system-path 'collects-dir)] to be the results of @racket[(find-system-path 'host-config-dir)] and - @racket[(find-system-path 'host-collects-dir)], respectively.} + @racket[(find-system-path 'host-collects-dir)], respectively. + If @FlagFirst{C} or @DFlagFirst{cross} is provided multiple + times, only the first instance has an effect.} @item{@FlagFirst{N} @nonterm{file} or @DFlagFirst{name} @nonterm{file} : sets the name of the executable as reported diff --git a/racket/src/racket/cmdline.inc b/racket/src/racket/cmdline.inc index 87c61379f0..571645d158 100644 --- a/racket/src/racket/cmdline.inc +++ b/racket/src/racket/cmdline.inc @@ -1311,11 +1311,13 @@ static int run_from_cmd_line(int argc, char *_argv[], was_config_flag = 1; break; case 'C': - cross_compile = 1; - scheme_set_cross_compile_mode(1); - was_config_flag = 1; - host_config_path = config_path; - host_collects_path = collects_path; + if (!cross_compile) { + cross_compile = 1; + scheme_set_cross_compile_mode(1); + was_config_flag = 1; + host_config_path = config_path; + host_collects_path = collects_path; + } break; case 'U': scheme_set_ignore_user_paths(1);