mirror of
https://git.proxmox.com/git/rustc
synced 2026-08-12 20:01:39 +00:00
Fix cross-compiling by building only with the "build" architecture
This commit is contained in:
parent
3cc6a50366
commit
981dad5c00
2
debian/config.toml.in
vendored
2
debian/config.toml.in
vendored
@ -9,7 +9,7 @@ cargo = "RUST_DESTDIR/usr/bin/cargo"
|
||||
|
||||
build = "DEB_BUILD_RUST_TYPE"
|
||||
host = ["DEB_HOST_RUST_TYPE"]
|
||||
target = ["wasm32-unknown-unknown", "DEB_TARGET_RUST_TYPE"]
|
||||
target = ["DEB_TARGET_RUST_TYPE"]
|
||||
|
||||
#full-bootstrap = true
|
||||
# originally needed to work around #45317 but no longer necessary
|
||||
|
||||
49
debian/patches/d-cross-compile-with-build-not-host.patch
vendored
Normal file
49
debian/patches/d-cross-compile-with-build-not-host.patch
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
--- a/src/bootstrap/builder.rs
|
||||
+++ b/src/bootstrap/builder.rs
|
||||
@@ -159,7 +159,7 @@
|
||||
pathset, self.name, builder.config.exclude
|
||||
);
|
||||
}
|
||||
- let hosts = &builder.hosts;
|
||||
+ //let hosts = &builder.hosts;
|
||||
|
||||
// Determine the targets participating in this rule.
|
||||
let targets = if self.only_hosts {
|
||||
@@ -172,17 +172,17 @@
|
||||
&builder.targets
|
||||
};
|
||||
|
||||
- for host in hosts {
|
||||
+ //for host in hosts {
|
||||
for target in targets {
|
||||
let run = RunConfig {
|
||||
builder,
|
||||
path: pathset.path(builder),
|
||||
- host: *host,
|
||||
+ host: builder.build.build,
|
||||
target: *target,
|
||||
};
|
||||
(self.make_run)(run);
|
||||
}
|
||||
- }
|
||||
+ //}
|
||||
}
|
||||
|
||||
fn run(v: &[StepDescription], builder: &Builder<'_>, paths: &[PathBuf]) {
|
||||
--- a/config.toml.example
|
||||
+++ b/config.toml.example
|
||||
@@ -115,12 +115,11 @@
|
||||
|
||||
# In addition to the build triple, other triples to produce full compiler
|
||||
# toolchains for. Each of these triples will be bootstrapped from the build
|
||||
-# triple and then will continue to bootstrap themselves. This platform must
|
||||
-# currently be able to run all of the triples provided here.
|
||||
+# triple and then will continue to bootstrap themselves.
|
||||
#host = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple
|
||||
|
||||
# In addition to all host triples, other triples to produce the standard library
|
||||
-# for. Each host triple will be used to produce a copy of the standard library
|
||||
+# for. Each build triple will be used to produce a copy of the standard library
|
||||
# for each target triple.
|
||||
#target = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple
|
||||
|
||||
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -29,6 +29,7 @@ d-read-beta-version-from-file.patch
|
||||
d-ignore-avx-44056.patch
|
||||
d-i686-baseline.patch
|
||||
d-no-jemalloc.patch
|
||||
d-cross-compile-with-build-not-host.patch
|
||||
|
||||
# Porter fixes under discussion, not suitable for upstreaming
|
||||
# as-is but a proper fix is being discussed
|
||||
|
||||
1
debian/rules
vendored
1
debian/rules
vendored
@ -196,6 +196,7 @@ override_dh_auto_configure-indep: debian/dh_auto_configure.stamp
|
||||
ifeq (true,$(BUILD_DOCS))
|
||||
# Change config.toml now and not later, since that might trigger a rebuild
|
||||
sed -i -e 's/^docs = false/docs = true/' debian/config.toml
|
||||
sed -i -e 's/^target = \["\(.*\)"\]/target = ["\1", "wasm32-unknown-unknown"]/' debian/config.toml
|
||||
endif
|
||||
|
||||
override_dh_auto_clean:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user