mirror of
https://codeberg.org/kiss-community/repo
synced 2024-07-02 22:12:27 +00:00
rust: 1.73.0
This commit is contained in:
parent
73f59121b8
commit
2e07b629e7
|
@ -2,31 +2,7 @@
|
|||
|
||||
export DESTDIR="$1"
|
||||
|
||||
for p in *.patch; do
|
||||
patch -p1 < "$p"
|
||||
done
|
||||
|
||||
: "${AR:=ar}"
|
||||
: "${CC:=cc}"
|
||||
|
||||
mkdir _lib
|
||||
|
||||
(
|
||||
cd _lib
|
||||
|
||||
$CC ../liblfs64.c -c -fPIC -o liblfs64.o
|
||||
$AR rcs liblfs64.a liblfs64.o
|
||||
|
||||
cat > cc <<EOF
|
||||
#!/bin/sh
|
||||
set -x
|
||||
PATH="$PATH"
|
||||
exec $CC \$@ -L$PWD -llfs64
|
||||
EOF
|
||||
chmod +x cc
|
||||
)
|
||||
|
||||
export PATH="$PWD/_lib:$PATH"
|
||||
patch -p1 < fix-curl.patch
|
||||
|
||||
# Instruct the compiler to trim absolute paths in resulting binaries and instead
|
||||
# change them to relative paths ($PWD/... ./...).
|
||||
|
@ -87,7 +63,7 @@ EOF
|
|||
# This mimics the download process of rust's 'x.py'
|
||||
# bootstrap library to allow for the removal of the internet
|
||||
# connection requirement per build.
|
||||
mkdir -p "${cache_dir:=build/cache/2023-07-13}"
|
||||
mkdir -p "${cache_dir:=build/cache/2023-09-19}"
|
||||
|
||||
for tarball in *.tar.xz\?no-extract; do
|
||||
mv -f "$tarball" "$cache_dir/${tarball%%\?no-extract}"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
0bd6a97bd64478a3508b83d1c6ffeb45904e8912c50f15f57d4ee9ba0b414fa3d2
|
||||
e261ba77035a56570b89f2fae672156fddc9e38f41e9231d880db49e1a6b19a1fd
|
||||
ce3cd8f5bf5343c38b5c72f0e8be8650656063436f7d748bd4d16bdf82c15f413e
|
||||
2ecd50f0dd6dd37056f393aca4e6d1248c89a6fd310fcadae7daa92cbeae43dbde
|
||||
92721c010db399ac8b20c5c849acb59d3ddb3449914203b56ca07fcaee8a978738
|
||||
daaef31bb2b4847b4f3d29ddb172568a3449d8c5ce7fdce25d0635560590677c41
|
||||
538e7b32b2cf2bc291c6922e65fd0e671222c22ed6c54d9eafe26d42d386385e96
|
||||
3c7c5d6022f6ce7a92ee793e503f2eae7a04e54540f1291b3503b7ed1e0d8e282c
|
||||
1c5f88fb12c49c8330f255b9519b52134dab13f6efb1b9ed41f732516e607ce628
|
||||
97086f892efe0679b6429e507aa65138ff21d1c776f583e593f5c1911e83bf1e7a
|
||||
ab61d2faa85e1c3c979da382a92020b06c58250e88487700d9d2716a3e316ac6fe
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int stat64(char *pathname, struct stat *statbuf) {
|
||||
return stat(pathname, statbuf);
|
||||
}
|
||||
|
||||
int fstat64(int fd, struct stat *statbuf) { return fstat(fd, statbuf); }
|
||||
|
||||
int fstatat64(int dirfd, char *pathname, struct stat *statbuf, int flags) {
|
||||
return fstatat(dirfd, pathname, statbuf, flags);
|
||||
}
|
||||
|
||||
int lstat64(char *restrict pathname, struct stat *statbuf) {
|
||||
return lstat(pathname, statbuf);
|
||||
}
|
||||
|
||||
int truncate64(char *path, off_t length) { return truncate(path, length); }
|
||||
|
||||
int ftruncate64(int fd, off_t length) { return ftruncate(fd, length); }
|
||||
|
||||
off_t lseek64(int fd, off_t offset, int whence) {
|
||||
return lseek(fd, offset, whence);
|
||||
}
|
||||
|
||||
int open64(const char *pathname, int flags,
|
||||
/* Technically this is undefined behaviour, but the `mode`
|
||||
* value is only checked if the relevant flag is set in `flags`
|
||||
* so a garbage value will never be read */
|
||||
mode_t mode) {
|
||||
return open(pathname, flags, mode);
|
||||
}
|
||||
|
||||
struct dirent *readdir64(DIR *dirp) { return readdir(dirp); }
|
||||
|
||||
ssize_t pread64(int fd, void *buf, size_t count, off_t offset) {
|
||||
return pread(fd, buf, count, offset);
|
||||
}
|
||||
|
||||
ssize_t pwrite64(int fd, void *buf, size_t count, off_t offset) {
|
||||
return pwrite(fd, buf, count, offset);
|
||||
}
|
|
@ -1,143 +0,0 @@
|
|||
diff --git a/library/std/src/os/linux/fs.rs b/library/std/src/os/linux/fs.rs
|
||||
index 479bbcc1..ab0b2a3e 100644
|
||||
--- a/library/std/src/os/linux/fs.rs
|
||||
+++ b/library/std/src/os/linux/fs.rs
|
||||
@@ -329,7 +329,14 @@ pub trait MetadataExt {
|
||||
impl MetadataExt for Metadata {
|
||||
#[allow(deprecated)]
|
||||
fn as_raw_stat(&self) -> &raw::stat {
|
||||
- unsafe { &*(self.as_inner().as_inner() as *const libc::stat64 as *const raw::stat) }
|
||||
+ #[cfg(target_env = "musl")]
|
||||
+ unsafe {
|
||||
+ &*(self.as_inner().as_inner() as *const libc::stat as *const raw::stat)
|
||||
+ }
|
||||
+ #[cfg(not(target_env = "musl"))]
|
||||
+ unsafe {
|
||||
+ &*(self.as_inner().as_inner() as *const libc::stat64 as *const raw::stat)
|
||||
+ }
|
||||
}
|
||||
fn st_dev(&self) -> u64 {
|
||||
self.as_inner().as_inner().st_dev as u64
|
||||
diff --git a/library/std/src/sys/unix/fd.rs b/library/std/src/sys/unix/fd.rs
|
||||
index 85e020ae..7489d5d2 100644
|
||||
--- a/library/std/src/sys/unix/fd.rs
|
||||
+++ b/library/std/src/sys/unix/fd.rs
|
||||
@@ -124,9 +124,12 @@ impl FileDesc {
|
||||
}
|
||||
|
||||
pub fn read_at(&self, buf: &mut [u8], offset: u64) -> io::Result<usize> {
|
||||
- #[cfg(not(any(target_os = "linux", target_os = "android")))]
|
||||
+ #[cfg(not(any(
|
||||
+ all(target_os = "linux", not(target_env = "musl")),
|
||||
+ target_os = "android"
|
||||
+ )))]
|
||||
use libc::pread as pread64;
|
||||
- #[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
+ #[cfg(any(all(target_os = "linux", not(target_env = "musl")), target_os = "android"))]
|
||||
use libc::pread64;
|
||||
|
||||
unsafe {
|
||||
@@ -281,9 +284,12 @@ impl FileDesc {
|
||||
}
|
||||
|
||||
pub fn write_at(&self, buf: &[u8], offset: u64) -> io::Result<usize> {
|
||||
- #[cfg(not(any(target_os = "linux", target_os = "android")))]
|
||||
+ #[cfg(not(any(
|
||||
+ all(target_os = "linux", not(target_env = "musl")),
|
||||
+ target_os = "android"
|
||||
+ )))]
|
||||
use libc::pwrite as pwrite64;
|
||||
- #[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
+ #[cfg(any(all(target_os = "linux", not(target_env = "musl")), target_os = "android"))]
|
||||
use libc::pwrite64;
|
||||
|
||||
unsafe {
|
||||
diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs
|
||||
index fbc7f04c..f6034155 100644
|
||||
--- a/library/std/src/sys/unix/fs.rs
|
||||
+++ b/library/std/src/sys/unix/fs.rs
|
||||
@@ -50,9 +50,13 @@ use libc::{c_int, mode_t};
|
||||
all(target_os = "linux", target_env = "gnu")
|
||||
))]
|
||||
use libc::c_char;
|
||||
-#[cfg(any(target_os = "linux", target_os = "emscripten", target_os = "android"))]
|
||||
+#[cfg(any(
|
||||
+ all(target_os = "linux", not(target_env = "musl")),
|
||||
+ target_os = "emscripten",
|
||||
+ target_os = "android"
|
||||
+))]
|
||||
use libc::dirfd;
|
||||
-#[cfg(any(target_os = "linux", target_os = "emscripten"))]
|
||||
+#[cfg(any(not(target_env = "musl"), target_os = "emscripten"))]
|
||||
use libc::fstatat64;
|
||||
#[cfg(any(
|
||||
target_os = "android",
|
||||
@@ -62,9 +66,10 @@ use libc::fstatat64;
|
||||
target_os = "illumos",
|
||||
target_os = "nto",
|
||||
target_os = "vita",
|
||||
+ target_env = "musl",
|
||||
))]
|
||||
use libc::readdir as readdir64;
|
||||
-#[cfg(target_os = "linux")]
|
||||
+#[cfg(all(target_os = "linux", not(target_env = "musl")))]
|
||||
use libc::readdir64;
|
||||
#[cfg(any(target_os = "emscripten", target_os = "l4re"))]
|
||||
use libc::readdir64_r;
|
||||
@@ -86,7 +91,13 @@ use libc::{
|
||||
dirent as dirent64, fstat as fstat64, fstatat as fstatat64, ftruncate64, lseek64,
|
||||
lstat as lstat64, off64_t, open as open64, stat as stat64,
|
||||
};
|
||||
+#[cfg(target_env = "musl")]
|
||||
+use libc::{
|
||||
+ dirent as dirent64, fstat as fstat64, ftruncate as ftruncate64, lseek as lseek64,
|
||||
+ lstat as lstat64, off_t as off64_t, open as open64, stat as stat64,
|
||||
+};
|
||||
#[cfg(not(any(
|
||||
+ target_env = "musl",
|
||||
target_os = "linux",
|
||||
target_os = "emscripten",
|
||||
target_os = "l4re",
|
||||
@@ -96,7 +107,7 @@ use libc::{
|
||||
dirent as dirent64, fstat as fstat64, ftruncate as ftruncate64, lseek as lseek64,
|
||||
lstat as lstat64, off_t as off64_t, open as open64, stat as stat64,
|
||||
};
|
||||
-#[cfg(any(target_os = "linux", target_os = "emscripten", target_os = "l4re"))]
|
||||
+#[cfg(any(not(target_env = "musl"), target_os = "emscripten", target_os = "l4re"))]
|
||||
use libc::{dirent64, fstat64, ftruncate64, lseek64, lstat64, off64_t, open64, stat64};
|
||||
|
||||
pub use crate::sys_common::fs::try_exists;
|
||||
@@ -283,6 +294,7 @@ unsafe impl Sync for Dir {}
|
||||
#[cfg(any(
|
||||
target_os = "android",
|
||||
target_os = "linux",
|
||||
+ not(target_env = "musl"),
|
||||
target_os = "solaris",
|
||||
target_os = "illumos",
|
||||
target_os = "fuchsia",
|
||||
@@ -324,6 +336,7 @@ struct dirent64_min {
|
||||
}
|
||||
|
||||
#[cfg(not(any(
|
||||
+ target_env = "musl",
|
||||
target_os = "android",
|
||||
target_os = "linux",
|
||||
target_os = "solaris",
|
||||
@@ -832,7 +845,7 @@ impl DirEntry {
|
||||
}
|
||||
|
||||
#[cfg(all(
|
||||
- any(target_os = "linux", target_os = "emscripten", target_os = "android"),
|
||||
+ any(not(target_env = "musl"), target_os = "emscripten", target_os = "android"),
|
||||
not(miri)
|
||||
))]
|
||||
pub fn metadata(&self) -> io::Result<FileAttr> {
|
||||
@@ -856,7 +869,7 @@ impl DirEntry {
|
||||
}
|
||||
|
||||
#[cfg(any(
|
||||
- not(any(target_os = "linux", target_os = "emscripten", target_os = "android")),
|
||||
+ not(any(not(target_env = "musl"), target_os = "emscripten", target_os = "android")),
|
||||
miri
|
||||
))]
|
||||
pub fn metadata(&self) -> io::Result<FileAttr> {
|
|
@ -1,7 +1,5 @@
|
|||
https://static.rust-lang.org/dist/rustc-1.72.1-src.tar.xz
|
||||
https://static.rust-lang.org/dist/2023-07-13/rust-std-1.71.0-x86_64-unknown-linux-musl.tar.xz?no-extract
|
||||
https://static.rust-lang.org/dist/2023-07-13/rustc-1.71.0-x86_64-unknown-linux-musl.tar.xz?no-extract
|
||||
https://static.rust-lang.org/dist/2023-07-13/cargo-1.71.0-x86_64-unknown-linux-musl.tar.xz?no-extract
|
||||
files/liblfs64.c
|
||||
https://static.rust-lang.org/dist/rustc-1.73.0-src.tar.xz
|
||||
https://static.rust-lang.org/dist/2023-09-19/rust-std-1.72.1-x86_64-unknown-linux-musl.tar.xz?no-extract
|
||||
https://static.rust-lang.org/dist/2023-09-19/rustc-1.72.1-x86_64-unknown-linux-musl.tar.xz?no-extract
|
||||
https://static.rust-lang.org/dist/2023-09-19/cargo-1.72.1-x86_64-unknown-linux-musl.tar.xz?no-extract
|
||||
patches/fix-curl.patch
|
||||
patches/lfs64-rust.patch
|
||||
|
|
|
@ -1 +1 @@
|
|||
1.72.1 1
|
||||
1.73.0 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user