semarie 2022-11-03 15:44:04 +00:00
parent 701434547d
commit 8cdfd2a295
15 changed files with 26 additions and 102 deletions

View File

@ -11,14 +11,13 @@ COMMENT-gdb = Rust debugger through gdb
COMMENT-clippy = Rust linter
COMMENT-rustfmt = Rust code formatter
V = 1.64.0
REVISION = 1
V = 1.65.0
DISTNAME = rustc-${V}-src
# rustc bootstrap version
BV-aarch64 = 1.64.0-20221010
BV-amd64 = 1.64.0-20221009
BV-i386 = 1.64.0-20221009
BV-aarch64 = 1.65.0-20221103
BV-amd64 = 1.65.0-20221101
BV-i386 = 1.65.0-20221101
BV-powerpc64 = 1.64.0-20221011
BV-riscv64 = 1.64.0-20221010
BV-sparc64 = 1.64.0-20221016

View File

@ -1,14 +1,14 @@
SHA256 (rust/rustc-1.64.0-src.tar.xz) = 6BcNMY+snS/BfVw+ZI5waPVujbjSM9hkrv++98ZULqw=
SHA256 (rust/rustc-bootstrap-aarch64-1.64.0-20221010.tar.xz) = fFV7BhUtWT4ja5bXTS/3AgaYQZjTTWRlbSq3sxnKTvA=
SHA256 (rust/rustc-bootstrap-amd64-1.64.0-20221009.tar.xz) = p1SPAQLR+9CV0r7h98nnrXaywTX0MLux1AuNJkzToro=
SHA256 (rust/rustc-bootstrap-i386-1.64.0-20221009.tar.xz) = VbBVGh2aMYIwMaxWG1HvkDpZwIrNUN50d6xdCGqpHGw=
SHA256 (rust/rustc-1.65.0-src.tar.xz) = LWqi6j/t1VrLvWX3g0k4X52qnBTiXbeo310BVYju4c8=
SHA256 (rust/rustc-bootstrap-aarch64-1.65.0-20221103.tar.xz) = qogGV5KnJKObaR6PFJObNq+6CnAHqA3SeDFq1cPM5Bg=
SHA256 (rust/rustc-bootstrap-amd64-1.65.0-20221101.tar.xz) = 9GAfqt0TLCZs1jKfKsgcPk5oJs9G4CE7tm/7KwOR3Qo=
SHA256 (rust/rustc-bootstrap-i386-1.65.0-20221101.tar.xz) = J0TyJMIOaLpvzCYFCJ76JT2h+pesmKrtpah9J0phTGI=
SHA256 (rust/rustc-bootstrap-powerpc64-1.64.0-20221011.tar.xz) = mpD2eUNZ1pCS3a5ATuYKsiN1ew26bG9KMynNLsUuJbA=
SHA256 (rust/rustc-bootstrap-riscv64-1.64.0-20221010.tar.xz) = XKv6ucrSSmePAj4tRpSmRup64IVxa3uYU+Q29rYTIC0=
SHA256 (rust/rustc-bootstrap-sparc64-1.64.0-20221016.tar.xz) = E2X+MF8huzJusjS5XqqlVPt5yr/jmK4jYEuiJEODyqs=
SIZE (rust/rustc-1.64.0-src.tar.xz) = 137841332
SIZE (rust/rustc-bootstrap-aarch64-1.64.0-20221010.tar.xz) = 58346016
SIZE (rust/rustc-bootstrap-amd64-1.64.0-20221009.tar.xz) = 64497020
SIZE (rust/rustc-bootstrap-i386-1.64.0-20221009.tar.xz) = 66036724
SIZE (rust/rustc-1.65.0-src.tar.xz) = 139674928
SIZE (rust/rustc-bootstrap-aarch64-1.65.0-20221103.tar.xz) = 60645464
SIZE (rust/rustc-bootstrap-amd64-1.65.0-20221101.tar.xz) = 67465684
SIZE (rust/rustc-bootstrap-i386-1.65.0-20221101.tar.xz) = 68959036
SIZE (rust/rustc-bootstrap-powerpc64-1.64.0-20221011.tar.xz) = 58564952
SIZE (rust/rustc-bootstrap-riscv64-1.64.0-20221010.tar.xz) = 63889584
SIZE (rust/rustc-bootstrap-sparc64-1.64.0-20221016.tar.xz) = 65184988

View File

@ -1,16 +0,0 @@
Index: compiler/rustc_llvm/build.rs
--- compiler/rustc_llvm/build.rs.orig
+++ compiler/rustc_llvm/build.rs
@@ -335,10 +335,10 @@ fn main() {
};
// RISC-V GCC erroneously requires libatomic for sub-word
- // atomic operations. FreeBSD uses Clang as its system
+ // atomic operations. OpenBSD or FreeBSD uses Clang as its system
// compiler and provides no libatomic in its base system so
// does not want this.
- if !target.contains("freebsd") && target.starts_with("riscv") {
+ if !target.contains("openbsd") && !target.contains("freebsd") && target.starts_with("riscv") {
println!("cargo:rustc-link-lib=atomic");
}

View File

@ -3,7 +3,7 @@ fallback to LOCALBASE as default sysroot.
Index: compiler/rustc_session/src/filesearch.rs
--- compiler/rustc_session/src/filesearch.rs.orig
+++ compiler/rustc_session/src/filesearch.rs
@@ -85,7 +85,10 @@ pub fn get_or_default_sysroot() -> PathBuf {
@@ -84,7 +84,10 @@ pub fn get_or_default_sysroot() -> PathBuf {
p.pop();
p
}

View File

@ -1,18 +1,13 @@
Add more openbsd archs
Keep riscv64-unknown-openbsd name for compat.
Index: compiler/rustc_target/src/spec/mod.rs
--- compiler/rustc_target/src/spec/mod.rs.orig
+++ compiler/rustc_target/src/spec/mod.rs
@@ -893,9 +893,11 @@ supported_targets! {
("aarch64-unknown-openbsd", aarch64_unknown_openbsd),
("i686-unknown-openbsd", i686_unknown_openbsd),
+ ("powerpc-unknown-openbsd", powerpc_unknown_openbsd),
+ ("powerpc64-unknown-openbsd", powerpc64_unknown_openbsd),
@@ -985,6 +985,7 @@ supported_targets! {
("powerpc-unknown-openbsd", powerpc_unknown_openbsd),
("powerpc64-unknown-openbsd", powerpc64_unknown_openbsd),
("riscv64gc-unknown-openbsd", riscv64gc_unknown_openbsd),
+ ("riscv64-unknown-openbsd", riscv64_unknown_openbsd),
("sparc64-unknown-openbsd", sparc64_unknown_openbsd),
("x86_64-unknown-openbsd", x86_64_unknown_openbsd),
- ("powerpc-unknown-openbsd", powerpc_unknown_openbsd),
("aarch64-unknown-netbsd", aarch64_unknown_netbsd),
("armv6-unknown-netbsd-eabihf", armv6_unknown_netbsd_eabihf),

View File

@ -1,23 +0,0 @@
Add powerpc64-unknown-openbsd support
Index: compiler/rustc_target/src/spec/powerpc64_unknown_openbsd.rs
--- compiler/rustc_target/src/spec/powerpc64_unknown_openbsd.rs.orig
+++ compiler/rustc_target/src/spec/powerpc64_unknown_openbsd.rs
@@ -0,0 +1,17 @@
+use crate::abi::Endian;
+use crate::spec::{LinkerFlavor, Target, TargetOptions};
+
+pub fn target() -> Target {
+ let mut base = super::openbsd_base::opts();
+ base.cpu = "ppc64".into();
+ base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".into());
+ base.max_atomic_width = Some(64);
+
+ Target {
+ llvm_target: "powerpc64-unknown-openbsd".into(),
+ pointer_width: 64,
+ data_layout: "E-m:e-i64:64-n32:64".into(),
+ arch: "powerpc64".into(),
+ options: TargetOptions { endian: Endian::Big, mcount: "_mcount".into(), ..base },
+ }
+}

View File

@ -3,7 +3,7 @@ The stack is immutable, and the kernel good enough to have a stack guard page.
Index: library/std/src/sys/unix/thread.rs
--- library/std/src/sys/unix/thread.rs.orig
+++ library/std/src/sys/unix/thread.rs
@@ -761,6 +761,16 @@ pub mod guard {
@@ -785,6 +785,16 @@ pub mod guard {
const GUARD_PAGES: usize = 1;
let guard = guardaddr..guardaddr + GUARD_PAGES * page_size;
Some(guard)

View File

@ -5,9 +5,9 @@ try to reduce memory usage on aarch64 and i386:
Index: src/bootstrap/bin/rustc.rs
--- src/bootstrap/bin/rustc.rs.orig
+++ src/bootstrap/bin/rustc.rs
@@ -106,6 +106,19 @@ fn main() {
@@ -115,6 +115,19 @@ fn main() {
{
cmd.arg("-C").arg("panic=abort");
cmd.arg("-Ztls-model=initial-exec");
}
+
+ if target.unwrap().contains("aarch64-unknown-openbsd")

View File

@ -3,7 +3,7 @@ Backport of https://github.com/rust-lang/rust/pull/101835
Index: src/bootstrap/builder.rs
--- src/bootstrap/builder.rs.orig
+++ src/bootstrap/builder.rs
@@ -1321,6 +1321,9 @@ impl<'a> Builder<'a> {
@@ -1325,6 +1325,9 @@ impl<'a> Builder<'a> {
) -> Cargo {
let mut cargo = Command::new(&self.initial_cargo);
let out_dir = self.stage_out(compiler, mode);

View File

@ -4,7 +4,7 @@ https://github.com/rust-lang/rust/issues/39900
Index: src/bootstrap/lib.rs
--- src/bootstrap/lib.rs.orig
+++ src/bootstrap/lib.rs
@@ -1049,7 +1049,6 @@ impl Build {
@@ -1052,7 +1052,6 @@ impl Build {
.args()
.iter()
.map(|s| s.to_string_lossy().into_owned())

View File

@ -1,19 +0,0 @@
Index: src/bootstrap/native.rs
--- src/bootstrap/native.rs.orig
+++ src/bootstrap/native.rs
@@ -358,12 +358,13 @@ impl Step for Llvm {
cfg.define("LLVM_LINK_LLVM_DYLIB", "ON");
}
- if target.starts_with("riscv") && !target.contains("freebsd") {
+ if target.starts_with("riscv") && !target.contains("freebsd")
+ && !target.contains("openbsd") {
// RISC-V GCC erroneously requires linking against
// `libatomic` when using 1-byte and 2-byte C++
// atomics but the LLVM build system check cannot
// detect this. Therefore it is set manually here.
- // FreeBSD uses Clang as its system compiler and
+ // FreeBSD or OpenBSD uses Clang as its system compiler and
// provides no libatomic in its base system so does
// not want this.
ldflags.exe.push(" -latomic");

View File

@ -3,7 +3,7 @@ Disable "Bootstrap" test by default (it requires network).
Index: src/bootstrap/test.rs
--- src/bootstrap/test.rs.orig
+++ src/bootstrap/test.rs
@@ -2412,7 +2412,7 @@ pub struct Bootstrap;
@@ -2388,7 +2388,7 @@ pub struct Bootstrap;
impl Step for Bootstrap {
type Output = ();

View File

@ -2,7 +2,7 @@ Index: src/test/run-make-fulldeps/relocation-model/Makefile
--- src/test/run-make-fulldeps/relocation-model/Makefile.orig
+++ src/test/run-make-fulldeps/relocation-model/Makefile
@@ -1,5 +1,9 @@
-include ../tools.mk
include ../tools.mk
+ifeq ($(UNAME),OpenBSD)
+skip:

View File

@ -1,12 +0,0 @@
Index: vendor/cc-1.0.69/src/lib.rs
--- vendor/cc-1.0.69/src/lib.rs.orig
+++ vendor/cc-1.0.69/src/lib.rs
@@ -1697,7 +1697,7 @@ impl Build {
let mut parts = target.split('-');
if let Some(arch) = parts.next() {
let arch = &arch[5..];
- if target.contains("linux") && arch.starts_with("64") {
+ if (target.contains("linux") || target.contains("openbsd")) && arch.starts_with("64") {
cmd.args.push(("-march=rv64gc").into());
cmd.args.push("-mabi=lp64d".into());
} else if target.contains("linux") && arch.starts_with("32") {

View File

@ -14,4 +14,4 @@ Index: vendor/libgit2-sys/build.rs
+ let try_to_use_system_libgit2 = !force && !vendored && !zlib_ng_compat;
if try_to_use_system_libgit2 {
let mut cfg = pkg_config::Config::new();
if let Ok(lib) = cfg.atleast_version("1.4.0").probe("libgit2") {
if let Ok(lib) = cfg.range_version("1.4.4".."1.6.0").probe("libgit2") {