diff --git a/programming/language/rust/actions.py b/programming/language/rust/actions.py old mode 100755 new mode 100644 index 5999582706..cfc9ab5d37 --- a/programming/language/rust/actions.py +++ b/programming/language/rust/actions.py @@ -22,19 +22,23 @@ WorkDir = "rustc-%s-src" %get.srcVERSION() #At phase 2, rust will be built again with this newly built rust. #Before phase 2, the lines below will be commented out. -RustBinDir = "rust-%s-x86_64-unknown-linux-gnu" %get.srcVERSION() -RustcDir = "%s/rustbin" %get.workDIR() +# Farklı sürüm ile derlenmek isterse aç kendi sürümünü kapat +# RustBinDir = "rust-1.89.0-x86_64-unknown-linux-gnu" + +# Kendi sürümü ile derleme +# RustBinDir = "rust-%s-x86_64-unknown-linux-gnu" %get.srcVERSION() +# RustcDir = "%s/rustbin" %get.workDIR() ################################################################# def build(): #İkinci aşamada bu satırlar da yoruma çevrilecek. #At phase 2, these lines also will be commented out. - shelltools.cd(RustBinDir) - shelltools.system("./install.sh --prefix=%s" %RustcDir) - shelltools.cd("..") - pisitools.dosed("config.toml", "/usr/bin/cargo", RustcDir+"/bin/cargo") - pisitools.dosed("config.toml", "/usr/bin/rustc", RustcDir+"/bin/rustc") + # shelltools.cd(RustBinDir) + # shelltools.system("./install.sh --prefix=%s" %RustcDir) + # shelltools.cd("..") + # pisitools.dosed("config.toml", "/usr/bin/cargo", RustcDir+"/bin/cargo") + # pisitools.dosed("config.toml", "/usr/bin/rustc", RustcDir+"/bin/rustc") #################################################### shelltools.export("LC_ALL", "en_US.UTF-8") diff --git a/programming/language/rust/files/0008-bootstrap-Workaround-for-system-stage0.patch b/programming/language/rust/files/0008-bootstrap-Workaround-for-system-stage0.patch new file mode 100644 index 0000000000..272529eec3 --- /dev/null +++ b/programming/language/rust/files/0008-bootstrap-Workaround-for-system-stage0.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Thu, 7 Aug 2025 19:01:26 +0200 +Subject: [PATCH] bootstrap: Workaround for system stage0 + +See: https://github.com/rust-lang/rust/issues/143735 +--- + src/bootstrap/src/core/build_steps/compile.rs | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs +index 30cbcc05c429..0b5f1b55a43e 100644 +--- a/src/bootstrap/src/core/build_steps/compile.rs ++++ b/src/bootstrap/src/core/build_steps/compile.rs +@@ -796,7 +796,10 @@ fn run(self, builder: &Builder<'_>) { + let _ = fs::remove_dir_all(sysroot.join("lib/rustlib/src/rust")); + } + +- builder.cp_link_r(&builder.initial_sysroot.join("lib"), &sysroot.join("lib")); ++ builder.cp_link_r( ++ &builder.initial_sysroot.join("lib/rustlib"), ++ &sysroot.join("lib/rustlib"), ++ ); + } else { + if builder.download_rustc() { + // Ensure there are no CI-rustc std artifacts. diff --git a/programming/language/rust/files/0009-bootstrap-Workaround-for-1.90.0-stage0.patch b/programming/language/rust/files/0009-bootstrap-Workaround-for-1.90.0-stage0.patch new file mode 100644 index 0000000000..5cc8166610 --- /dev/null +++ b/programming/language/rust/files/0009-bootstrap-Workaround-for-1.90.0-stage0.patch @@ -0,0 +1,34 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Fri, 19 Sep 2025 17:42:45 +0200 +Subject: [PATCH] bootstrap: Workaround for 1.90.0 stage0 + +See: https://github.com/rust-lang/rust/issues/143765 +--- + src/bootstrap/src/utils/helpers.rs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/bootstrap/src/utils/helpers.rs b/src/bootstrap/src/utils/helpers.rs +index eb00ed566c2d..86b3358a22b7 100644 +--- a/src/bootstrap/src/utils/helpers.rs ++++ b/src/bootstrap/src/utils/helpers.rs +@@ -430,17 +430,17 @@ pub fn linker_flags( + // cfg(bootstrap) - remove the stage 0 check after updating the bootstrap compiler: + // `-Clinker-features` has been stabilized. + if stage == 0 { +- args.push("-Zlinker-features=+lld".to_string()); ++ args.push("-Clinker-features=+lld".to_string()); + } else { + args.push("-Clinker-features=+lld".to_string()); + } + args.push("-Zunstable-options".to_string()); + } + LldMode::SelfContained => { + // cfg(bootstrap) - remove the stage 0 check after updating the bootstrap compiler: + // `-Clinker-features` has been stabilized. + if stage == 0 { +- args.push("-Zlinker-features=+lld".to_string()); ++ args.push("-Clinker-features=+lld".to_string()); + } else { + args.push("-Clinker-features=+lld".to_string()); + } diff --git a/programming/language/rust/files/bootstrap-config.toml b/programming/language/rust/files/bootstrap-config.toml index 66d5903bfc..82104654f5 100644 --- a/programming/language/rust/files/bootstrap-config.toml +++ b/programming/language/rust/files/bootstrap-config.toml @@ -1,6 +1,8 @@ profile = "user" # changelog-seen = 2 +change-id = 144675 + [llvm] link-shared = true @@ -30,6 +32,7 @@ rpath = false lld = false use-lld = "external" +llvm-bitcode-linker = false # backtrace-on-ice = true diff --git a/programming/language/rust/pspec.xml b/programming/language/rust/pspec.xml old mode 100755 new mode 100644 index f3ca76e58e..e2a738e44e --- a/programming/language/rust/pspec.xml +++ b/programming/language/rust/pspec.xml @@ -15,12 +15,12 @@ https://static.rust-lang.org/dist/rustc-1.90.0-src.tar.gz - https://static.rust-lang.org/dist/rust-1.90.0-x86_64-unknown-linux-gnu.tar.gz + bootstrap-config.toml - rust + rust perl" llvm lld-devel @@ -41,7 +41,8 @@ llvm-clang-devel - + 0008-bootstrap-Workaround-for-system-stage0.patch + 0009-bootstrap-Workaround-for-1.90.0-stage0.patch