diff options
Diffstat (limited to 'repos/clang/rust')
| -rw-r--r-- | repos/clang/rust/.checksum | 8 | ||||
| -rw-r--r-- | repos/clang/rust/.files | 108 | ||||
| -rw-r--r-- | repos/clang/rust/abuild | 102 | ||||
| -rw-r--r-- | repos/clang/rust/depends | 1 | ||||
| -rw-r--r-- | repos/clang/rust/fix-bootstrap.patch | 14 | ||||
| -rw-r--r-- | repos/clang/rust/fix-curl.patch | 26 | ||||
| -rw-r--r-- | repos/clang/rust/fix-linux_musl_base.patch | 57 | ||||
| -rw-r--r-- | repos/clang/rust/libressl.patch | 10 |
8 files changed, 326 insertions, 0 deletions
diff --git a/repos/clang/rust/.checksum b/repos/clang/rust/.checksum new file mode 100644 index 00000000..26cca43c --- /dev/null +++ b/repos/clang/rust/.checksum @@ -0,0 +1,8 @@ +e532c42d7eb325d75c298596b6865636bc88ea0df21ee7d092b0e9ada65a301f cargo-1.83.0-x86_64-unknown-linux-musl.tar.xz +879b657d8928ddb722e1e5447d3d26aa5e5df8b31e55bf037348388b3005bb5e fix-bootstrap.patch +c03ac16dbb7aecb143e7cd701feb480862af63dbb044e0f0637eaff93758937f fix-curl.patch +fb0fef39b363d51813605394a68ba775dc6c9cc295bd9f9e718d0e13376bbdfc fix-linux_musl_base.patch +cfe8a050a1acc17c735c5af1b86989b38f99c14bbff509739523ede8768c2eab libressl.patch +0421a2eb37e34e28fea9318b0771e79cd2f7c8da56272e40e41b5ee1e20b7b07 rust-std-1.83.0-x86_64-unknown-linux-musl.tar.xz +34ef847a906f161bad351fa173d9c44f58cda6db3213717cd43b08c53b706eef rustc-1.83.0-x86_64-unknown-linux-musl.tar.xz +ec87dbce94022019aeecf269e58bba8bc4face7d5ac8745f301a74683c065a51 rustc-1.84.1-src.tar.xz diff --git a/repos/clang/rust/.files b/repos/clang/rust/.files new file mode 100644 index 00000000..2726a07a --- /dev/null +++ b/repos/clang/rust/.files @@ -0,0 +1,108 @@ +drwxr-xr-x root/root etc/ +drwxr-xr-x root/root etc/bash_completion.d/ +-rw-r--r-- root/root etc/bash_completion.d/cargo.new +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/cargo +-rwxr-xr-x root/root usr/bin/cargo-fmt +-rwxr-xr-x root/root usr/bin/rust-gdb +-rwxr-xr-x root/root usr/bin/rust-gdbgui +-rwxr-xr-x root/root usr/bin/rust-lldb +-rwxr-xr-x root/root usr/bin/rustc +-rwxr-xr-x root/root usr/bin/rustfmt +drwxr-xr-x root/root usr/lib/ +-rw-r--r-- root/root usr/lib/librustc_driver-ce439f79e4196a4c.so +drwxr-xr-x root/root usr/lib/rustlib/ +-rw-r--r-- root/root usr/lib/rustlib/components +drwxr-xr-x root/root usr/lib/rustlib/etc/ +-rw-r--r-- root/root usr/lib/rustlib/etc/gdb_load_rust_pretty_printers.py +-rw-r--r-- root/root usr/lib/rustlib/etc/gdb_lookup.py +-rw-r--r-- root/root usr/lib/rustlib/etc/gdb_providers.py +-rw-r--r-- root/root usr/lib/rustlib/etc/lldb_commands +-rw-r--r-- root/root usr/lib/rustlib/etc/lldb_lookup.py +-rw-r--r-- root/root usr/lib/rustlib/etc/lldb_providers.py +-rw-r--r-- root/root usr/lib/rustlib/etc/rust_types.py +-rw-r--r-- root/root usr/lib/rustlib/install.log +-rw-r--r-- root/root usr/lib/rustlib/manifest-cargo +-rw-r--r-- root/root usr/lib/rustlib/manifest-rust-std-x86_64-unknown-linux-musl +-rw-r--r-- root/root usr/lib/rustlib/manifest-rustc +-rw-r--r-- root/root usr/lib/rustlib/manifest-rustfmt-preview +-rw-r--r-- root/root usr/lib/rustlib/rust-installer-version +drwxr-xr-x root/root usr/lib/rustlib/x86_64-unknown-linux-musl/ +drwxr-xr-x root/root usr/lib/rustlib/x86_64-unknown-linux-musl/bin/ +-rwxr-xr-x root/root usr/lib/rustlib/x86_64-unknown-linux-musl/bin/rust-objcopy +drwxr-xr-x root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/ +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-4defd4c410ff6459.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libcfg_if-5626cc85f927ec30.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libcompiler_builtins-2ecd7722e2951db5.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libcore-057efe2ac648c340.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libgetopts-50fbfb88b7e7d64f.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libhashbrown-8d3f7f658b3745fa.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/liblibc-b828efa1ccb298b1.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_abort-2b9c302811aa6f53.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_unwind-e25295a8c84d5247.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libproc_macro-ef9bd00ce3292de0.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_demangle-da76feed4dc818ea.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_alloc-a09abacdfc4b0d9f.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_core-73ac8d6dd28b581d.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_std-0846068256842ab2.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-8f915b83d1836bac.rlib +-rwxr-xr-x root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-8f915b83d1836bac.so +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd_detect-47acc5df8282740d.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libsysroot-703a5c5e3802c8d6.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libtest-4bdc9f027d88e7d4.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libunicode_width-0949dccf5f5734fa.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libunwind-04326292de3fd404.rlib +drwxr-xr-x root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/ +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/Scrt1.o +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crt1.o +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crtbegin.o +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crtbeginS.o +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crtend.o +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crtendS.o +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crti.o +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crtn.o +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/libc.a +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/libunwind.a +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/rcrt1.o +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +-rw-r--r-- root/root usr/share/man/man1/cargo-add.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-bench.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-build.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-check.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-clean.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-doc.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-fetch.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-fix.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-generate-lockfile.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-help.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-info.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-init.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-install.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-locate-project.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-login.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-logout.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-metadata.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-new.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-owner.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-package.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-pkgid.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-publish.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-remove.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-report.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-run.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-rustc.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-rustdoc.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-search.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-test.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-tree.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-uninstall.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-update.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-vendor.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-version.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-yank.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo.1.gz +-rw-r--r-- root/root usr/share/man/man1/rustc.1.gz +-rw-r--r-- root/root usr/share/man/man1/rustdoc.1.gz diff --git a/repos/clang/rust/abuild b/repos/clang/rust/abuild new file mode 100644 index 00000000..eb9640f7 --- /dev/null +++ b/repos/clang/rust/abuild @@ -0,0 +1,102 @@ +name=rust +version=1.84.1 + +##cat src/stage0.txt +export _date=2024-11-28 +export _rustc=1.83.0 +export _cargo=$_rustc +## + +release=1 +source="https://static.rust-lang.org/dist/${name}c-$version-src.tar.xz + https://static.rust-lang.org/dist/$_date/rust-std-$_rustc-x86_64-unknown-linux-musl.tar.xz::noextract + https://static.rust-lang.org/dist/$_date/rustc-$_rustc-x86_64-unknown-linux-musl.tar.xz::noextract + https://static.rust-lang.org/dist/$_date/cargo-$_cargo-x86_64-unknown-linux-musl.tar.xz::noextract + fix-linux_musl_base.patch + fix-bootstrap.patch + libressl.patch + fix-curl.patch" +build_dir=${name}c-$version-src +keep_static=1 +no_strip=1 + +build() { + mkdir -p build/cache/$_date + + _tuplet=x86_64-unknown-linux-musl + cp $SRC/rust-std-$_rustc-x86_64-unknown-linux-musl.tar.xz build/cache/$_date/ + cp $SRC/rustc-$_rustc-x86_64-unknown-linux-musl.tar.xz build/cache/$_date/ + cp $SRC/cargo-$_cargo-x86_64-unknown-linux-musl.tar.xz build/cache/$_date/ + + sed -i 's/\(crt_static_default = \)true/\1false/' compiler/rustc_target/src/spec/base/linux_musl.rs + sed -i 's/\("files":{\)[^}]*/\1/' vendor/curl-sys-0.4.52+curl-7.81.0/.cargo-checksum.json + sed -i 's/\("files":{\)[^}]*/\1/' vendor/curl-sys-0.4.74+curl-8.9.0/.cargo-checksum.json + sed -i 's/\("files":{\)[^}]*/\1/' vendor/openssl-sys-0.9.92/.cargo-checksum.json + + cat > config.toml <<EOF +[llvm] +link-shared = true +download-ci-llvm = false +static-libstdcpp = false +use-libcxx = true + +[build] +build = "$_tuplet" +host = [ "$_tuplet" ] +target = [ "$_tuplet" ] + +docs = false +compiler-docs = false +extended = true +submodules = false +python = "python3" +locked-deps = true +vendor = true +tools = [ "cargo", "rustfmt" ] +sanitizers = false +profiler = false +full-bootstrap = false + +[install] +prefix = "/usr" + +[target.$_tuplet] +llvm-config = "/usr/bin/llvm-config" +crt-static = false +sanitizers = false + +[dist] +src-tarball = false + +[rust] +backtrace = false +channel = "stable" +codegen-tests = false +codegen-units-std = 1 +codegen-units = 0 +debug = false +debug-assertions = false +debuginfo-level = 0 +incremental = false +jemalloc = false +rpath = false +dist-src = false +llvm-libunwind = "system" +EOF + + mkdir -p libgcc + printf 'INPUT(-lunwind)\n' > libgcc/libgcc_s.so + ln -sf $(cc -print-file-name=libunwind.so) libgcc/libgcc_s.so.1 + export LD_LIBRARY_PATH="$PWD/libgcc:$LD_LIBRARY_PATH" + export LIBRARY_PATH="$PWD/libgcc:$LIBRARY_PATH" + + mkdir "$SRC/rust" + export RUST_BACKTRACE=1 + + #python x.py build + python x.py install + + rm -rf $PKG/usr/lib/rustlib/src/ \ + $PKG/usr/share/zsh \ + $PKG/usr/lib/rustlib/uninstall.sh +} diff --git a/repos/clang/rust/depends b/repos/clang/rust/depends new file mode 100644 index 00000000..453889a6 --- /dev/null +++ b/repos/clang/rust/depends @@ -0,0 +1 @@ +llvm diff --git a/repos/clang/rust/fix-bootstrap.patch b/repos/clang/rust/fix-bootstrap.patch new file mode 100644 index 00000000..9d945932 --- /dev/null +++ b/repos/clang/rust/fix-bootstrap.patch @@ -0,0 +1,14 @@ +diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs +index e706aba..35d69a6 100644 +--- a/src/bootstrap/src/core/config/config.rs ++++ b/src/bootstrap/src/core/config/config.rs +@@ -2786,8 +2786,7 @@ impl Config { + + // If `download-rustc` is not set, default to rebuilding. + let if_unchanged = match download_rustc { +- None => self.rust_info.is_managed_git_subrepository(), +- Some(StringOrBool::Bool(false)) => return None, ++ None | Some(StringOrBool::Bool(false)) => return None, + Some(StringOrBool::Bool(true)) => false, + Some(StringOrBool::String(s)) if s == "if-unchanged" => { + if !self.rust_info.is_managed_git_subrepository() { diff --git a/repos/clang/rust/fix-curl.patch b/repos/clang/rust/fix-curl.patch new file mode 100644 index 00000000..e0469d8d --- /dev/null +++ b/repos/clang/rust/fix-curl.patch @@ -0,0 +1,26 @@ +diff --git a/vendor/curl-sys-0.4.52+curl-7.81.0/build.rs b/vendor/curl-sys-0.4.52+curl-7.81.0/build.rs +index e9a2a42..560bfed 100644 +--- a/vendor/curl-sys-0.4.52+curl-7.81.0/build.rs ++++ b/vendor/curl-sys-0.4.52+curl-7.81.0/build.rs +@@ -111,6 +111,8 @@ fn main() { + .include("curl/lib") + .include("curl/include") + .define("BUILDING_LIBCURL", None) ++ .define("CURL_CA_BUNDLE", "\"/etc/ssl/cert.pem\"") ++ .define("CURL_CA_PATH", "\"/etc/ssl/certs\"") + .define("CURL_DISABLE_DICT", None) + .define("CURL_DISABLE_GOPHER", None) + .define("CURL_DISABLE_IMAP", None) +diff --git a/vendor/curl-sys-0.4.74+curl-8.9.0/build.rs b/vendor/curl-sys-0.4.74+curl-8.9.0/build.rs +index 7d9a661..683354e 100644 +--- a/vendor/curl-sys-0.4.74+curl-8.9.0/build.rs ++++ b/vendor/curl-sys-0.4.74+curl-8.9.0/build.rs +@@ -109,6 +109,8 @@ fn main() { + .include("curl/lib") + .include("curl/include") + .define("BUILDING_LIBCURL", None) ++ .define("CURL_CA_BUNDLE", "\"/etc/ssl/cert.pem\"") ++ .define("CURL_CA_PATH", "\"/etc/ssl/certs\"") + .define("CURL_DISABLE_DICT", None) + .define("CURL_DISABLE_GOPHER", None) + .define("CURL_DISABLE_IMAP", None) diff --git a/repos/clang/rust/fix-linux_musl_base.patch b/repos/clang/rust/fix-linux_musl_base.patch new file mode 100644 index 00000000..a9293008 --- /dev/null +++ b/repos/clang/rust/fix-linux_musl_base.patch @@ -0,0 +1,57 @@ +From: Jakub Jirutka <jakub@jirutka.cz> +Date: Sat, 08 Aug 2016 15:06:00 +0200 +Subject: [PATCH] Fix linux_musl_base for native musl host + +See https://github.com/rust-lang/rust/pull/40113 + +--- a/compiler/rustc_target/src/spec/base/linux_musl.rs ++++ b/compiler/rustc_target/src/spec/base/linux_musl.rs +@@ -1,15 +1,12 @@ +-use crate::spec::{LinkSelfContainedDefault, TargetOptions, base, crt_objects}; ++use crate::spec::{base, TargetOptions}; + + pub(crate) fn opts() -> TargetOptions { + let mut base = base::linux::opts(); + + base.env = "musl".into(); +- base.pre_link_objects_self_contained = crt_objects::pre_musl_self_contained(); +- base.post_link_objects_self_contained = crt_objects::post_musl_self_contained(); +- base.link_self_contained = LinkSelfContainedDefault::InferredForMusl; + + // These targets statically link libc by default +- base.crt_static_default = true; ++ base.crt_static_default = false; + + base + } +--- a/compiler/rustc_target/src/spec/crt_objects.rs ++++ b/compiler/rustc_target/src/spec/crt_objects.rs +@@ -58,28 +61,6 @@ + (LinkOutputKind::StaticPicExe, &[obj]), + (LinkOutputKind::DynamicDylib, &[obj]), + (LinkOutputKind::StaticDylib, &[obj]), +- ]) +-} +- +-pub(super) fn pre_musl_self_contained() -> CrtObjects { +- new(&[ +- (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o", "crtbegin.o"]), +- (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o", "crtbeginS.o"]), +- (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o", "crtbegin.o"]), +- (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o", "crtbeginS.o"]), +- (LinkOutputKind::DynamicDylib, &["crti.o", "crtbeginS.o"]), +- (LinkOutputKind::StaticDylib, &["crti.o", "crtbeginS.o"]), +- ]) +-} +- +-pub(super) fn post_musl_self_contained() -> CrtObjects { +- new(&[ +- (LinkOutputKind::DynamicNoPicExe, &["crtend.o", "crtn.o"]), +- (LinkOutputKind::DynamicPicExe, &["crtendS.o", "crtn.o"]), +- (LinkOutputKind::StaticNoPicExe, &["crtend.o", "crtn.o"]), +- (LinkOutputKind::StaticPicExe, &["crtendS.o", "crtn.o"]), +- (LinkOutputKind::DynamicDylib, &["crtendS.o", "crtn.o"]), +- (LinkOutputKind::StaticDylib, &["crtendS.o", "crtn.o"]), + ]) + } + diff --git a/repos/clang/rust/libressl.patch b/repos/clang/rust/libressl.patch new file mode 100644 index 00000000..6530eab7 --- /dev/null +++ b/repos/clang/rust/libressl.patch @@ -0,0 +1,10 @@ +--- rustc-1.84.0-src-orig/vendor/openssl-sys-0.9.92/build/main.rs 2025-01-07 09:26:09.000000000 +0800 ++++ rustc-1.84.0-src/vendor/openssl-sys-0.9.92/build/main.rs 2025-01-26 00:07:32.617036110 +0800 +@@ -273,6 +273,7 @@ + (3, 7, 1) => ('3', '7', '1'), + (3, 7, _) => ('3', '7', 'x'), + (3, 8, 0) => ('3', '8', '0'), ++ (4, 0, _) => ('4', '0', 'x'), + _ => version_error(), + }; +
\ No newline at end of file |