mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
extra/rust to 1.78.0-1
This commit is contained in:
parent
2a29bdae77
commit
d6d6cce2be
5 changed files with 78 additions and 87 deletions
|
@ -1,15 +1,17 @@
|
|||
pkgbase = rust
|
||||
pkgdesc = Systems programming language focused on safety, speed and concurrency
|
||||
pkgver = 1.77.2
|
||||
pkgrel = 2
|
||||
pkgver = 1.78.0
|
||||
pkgrel = 1
|
||||
epoch = 1
|
||||
url = https://www.rust-lang.org/
|
||||
arch = x86_64
|
||||
license = Apache-2.0 OR MIT
|
||||
checkdepends = gdb
|
||||
checkdepends = procps-ng
|
||||
makedepends = clang
|
||||
makedepends = cmake
|
||||
makedepends = lib32-gcc-libs
|
||||
makedepends = lib32-glibc
|
||||
makedepends = libffi
|
||||
makedepends = lld
|
||||
makedepends = llvm
|
||||
|
@ -19,25 +21,29 @@ pkgbase = rust
|
|||
makedepends = python
|
||||
makedepends = rust
|
||||
makedepends = wasi-libc
|
||||
depends = bash
|
||||
depends = curl
|
||||
depends = gcc
|
||||
depends = gcc-libs
|
||||
depends = glibc
|
||||
depends = libssh2
|
||||
depends = llvm-libs
|
||||
depends = openssl
|
||||
depends = zlib
|
||||
options = !emptydirs
|
||||
options = !lto
|
||||
source = https://static.rust-lang.org/dist/rustc-1.77.2-src.tar.gz
|
||||
source = https://static.rust-lang.org/dist/rustc-1.77.2-src.tar.gz.asc
|
||||
source = https://static.rust-lang.org/dist/rustc-1.78.0-src.tar.gz
|
||||
source = https://static.rust-lang.org/dist/rustc-1.78.0-src.tar.gz.asc
|
||||
source = 0001-bootstrap-Change-libexec-dir.patch
|
||||
source = 0002-bootstrap-Change-bash-completion-dir.patch
|
||||
source = 0003-compiler-Change-LLVM-targets.patch
|
||||
source = 0004-compiler-Use-wasm-ld-for-wasm-targets.patch
|
||||
validpgpkeys = 108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE
|
||||
b2sums = cf9fd96580d2c696e8d2992a5b4ee285824648bfa721212dd7691d63c876cf8fda1d50e924bec891af2c721e3746c4227fd23a0bed48e0b505fcd328936f5a35
|
||||
b2sums = 3f43a1c50e268afbe76755ae24bccb3db9ff4dd8bbb8130c75d486c4c0e40f0253c4d4cad1de1040600c090d03d93b08adee5b16fa8abcf36d47a3c14024719f
|
||||
b2sums = SKIP
|
||||
b2sums = d3ed7043e288c78ac4007b267448457db0972905037754b67249d81be0889f47c4d93573c24d730907c31ec44e80ce696fbf50f98521eadee92c003d2324a1a3
|
||||
b2sums = 6afaf5bff729618aa35d84f20b1447694c887b84a406f55344864b9e8dce72f80467412c128b5309d5b962b605ca396b77a52f275dd35681ab50cbedc68f873a
|
||||
b2sums = 18ca47c350373d9a095aff9a658c61816a542bb391a2a8ddf582f25795a21e9fc344b3e71a2eed7b094610bb61d9658e5360ef2ace9441fd21e4193746d45be7
|
||||
b2sums = ef56a70741bae70a95695b4d05d1a6395f545e671c9d016c7180732f69a09b828ff5e16964ef16f9ebec55dd778a1b50927275cd4c21a7b78ae4959946a0657c
|
||||
b2sums = d20861a8a8e16d4bb0143f00d4beb42e2c52eeb2c1894e9f9c04e3d74ecd750d9bdacf15bb39fd0ade4487b9d3d14da24cf5f25ceab112f096fddcd329320a15
|
||||
b2sums = 64391cf17e7d801fb263e9d637928c3a2f6aa11aca6afbf115be4e38e9afce42371ed4884929cf11d6c74c2aa497fb26abbba1812d4f31f44dcda38e4978a33f
|
||||
b2sums = 23f399d5ea776df5dba1ec42a96020a7ae3b18f5a83121d90ca0256a90027529135bac751373a31480860c0dbad30598833a7da43d1e7f25ce5b6d5d945ce550
|
||||
|
||||
pkgname = rust
|
||||
|
@ -56,6 +62,7 @@ pkgname = rust
|
|||
pkgname = lib32-rust-libs
|
||||
pkgdesc = 32-bit target and libraries for Rust
|
||||
depends = lib32-gcc-libs
|
||||
depends = lib32-glibc
|
||||
depends = rust
|
||||
provides = lib32-rust
|
||||
conflicts = lib32-rust
|
||||
|
|
|
@ -9,10 +9,10 @@ Subject: [PATCH] bootstrap: Change libexec dir
|
|||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
|
||||
index f50026368dab..6940e0c50752 100644
|
||||
index 012d64e53443..a077e67e49dc 100644
|
||||
--- a/src/bootstrap/src/core/build_steps/dist.rs
|
||||
+++ b/src/bootstrap/src/core/build_steps/dist.rs
|
||||
@@ -423,7 +423,7 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
|
||||
@@ -424,7 +424,7 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
|
||||
},
|
||||
builder.kind,
|
||||
) {
|
||||
|
@ -22,15 +22,15 @@ index f50026368dab..6940e0c50752 100644
|
|||
|
||||
let libdir_relative = builder.libdir_relative(compiler);
|
||||
diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs
|
||||
index 5d8d10a7debc..f52315416bd4 100644
|
||||
index 3c2001121037..17c816c6230a 100644
|
||||
--- a/src/bootstrap/src/core/build_steps/tool.rs
|
||||
+++ b/src/bootstrap/src/core/build_steps/tool.rs
|
||||
@@ -682,7 +682,7 @@ fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
|
||||
@@ -684,7 +684,7 @@ fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
|
||||
|
||||
// Copy `rust-analyzer-proc-macro-srv` to `<sysroot>/libexec/`
|
||||
// so that r-a can use it.
|
||||
- let libexec_path = builder.sysroot(self.compiler).join("libexec");
|
||||
+ let libexec_path = builder.sysroot(self.compiler).join("lib");
|
||||
t!(fs::create_dir_all(&libexec_path));
|
||||
builder.copy(&path, &libexec_path.join("rust-analyzer-proc-macro-srv"));
|
||||
builder.copy_link(&path, &libexec_path.join("rust-analyzer-proc-macro-srv"));
|
||||
|
||||
|
|
|
@ -8,12 +8,12 @@ Subject: [PATCH] bootstrap: Change bash-completion dir
|
|||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
|
||||
index 6940e0c50752..d45daad3a829 100644
|
||||
index a077e67e49dc..eac689560808 100644
|
||||
--- a/src/bootstrap/src/core/build_steps/dist.rs
|
||||
+++ b/src/bootstrap/src/core/build_steps/dist.rs
|
||||
@@ -1071,7 +1071,11 @@ fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
|
||||
@@ -1072,7 +1072,11 @@ fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
|
||||
|
||||
tarball.add_file(&cargo, "bin", 0o755);
|
||||
tarball.add_file(cargo, "bin", 0o755);
|
||||
tarball.add_file(etc.join("_cargo"), "share/zsh/site-functions", 0o644);
|
||||
- tarball.add_renamed_file(etc.join("cargo.bashcomp.sh"), "etc/bash_completion.d", "cargo");
|
||||
+ tarball.add_renamed_file(
|
||||
|
|
|
@ -17,47 +17,28 @@ targets, as things break when this is done:
|
|||
`rustc --version --verbose`) is different from the target triple
|
||||
(from `rustc --print target-list`) that best matches autoconf.
|
||||
---
|
||||
compiler/rustc_session/src/config.rs | 2 +-
|
||||
compiler/rustc_target/src/spec/mod.rs | 9 +++++++++
|
||||
.../src/spec/targets/i686_unknown_linux_gnu.rs | 2 +-
|
||||
.../src/spec/targets/x86_64_unknown_linux_gnu.rs | 2 +-
|
||||
4 files changed, 12 insertions(+), 3 deletions(-)
|
||||
compiler/rustc_session/src/config.rs | 4 ++++
|
||||
.../rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs | 2 +-
|
||||
.../rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs | 2 +-
|
||||
3 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
|
||||
index d35f951e2aea..7841c4d19094 100644
|
||||
index b7ee2c980254..3be7b748718d 100644
|
||||
--- a/compiler/rustc_session/src/config.rs
|
||||
+++ b/compiler/rustc_session/src/config.rs
|
||||
@@ -2221,7 +2221,7 @@ pub fn parse_target_triple(early_dcx: &EarlyDiagCtxt, matches: &getopts::Matches
|
||||
@@ -2222,6 +2222,10 @@ pub fn parse_target_triple(early_dcx: &EarlyDiagCtxt, matches: &getopts::Matches
|
||||
early_dcx.early_fatal(format!("target file {path:?} does not exist"))
|
||||
})
|
||||
}
|
||||
- Some(target) => TargetTriple::TargetTriple(target),
|
||||
+ Some(target) => TargetTriple::from_alias(target),
|
||||
+ Some(s) if &s == "x86_64-pc-linux-gnu" => {
|
||||
+ TargetTriple::from_triple("x86_64-unknown-linux-gnu")
|
||||
+ }
|
||||
+ Some(s) if &s == "i686-pc-linux-gnu" => TargetTriple::from_triple("i686-unknown-linux-gnu"),
|
||||
Some(target) => TargetTriple::TargetTriple(target),
|
||||
_ => TargetTriple::from_triple(host_triple()),
|
||||
}
|
||||
}
|
||||
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
|
||||
index 6c698c5b01dd..4a1c2dd18b8d 100644
|
||||
--- a/compiler/rustc_target/src/spec/mod.rs
|
||||
+++ b/compiler/rustc_target/src/spec/mod.rs
|
||||
@@ -3453,6 +3453,15 @@ pub fn from_path(path: &Path) -> Result<Self, io::Error> {
|
||||
Ok(TargetTriple::TargetJson { path_for_rustdoc: canonicalized_path, triple, contents })
|
||||
}
|
||||
|
||||
+ /// Creates a target triple from its alias
|
||||
+ pub fn from_alias(triple: String) -> Self {
|
||||
+ match triple.as_str() {
|
||||
+ "x86_64-pc-linux-gnu" => TargetTriple::from_triple("x86_64-unknown-linux-gnu"),
|
||||
+ "i686-pc-linux-gnu" => TargetTriple::from_triple("i686-unknown-linux-gnu"),
|
||||
+ _ => TargetTriple::TargetTriple(triple),
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/// Returns a string triple for this target.
|
||||
///
|
||||
/// If this target is a path, the file name (without extension) is returned.
|
||||
diff --git a/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs
|
||||
index 9bc38a72f4d3..a7a36eb3c9d6 100644
|
||||
index 1d4916cabfdf..4caab818efdb 100644
|
||||
--- a/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs
|
||||
+++ b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs
|
||||
@@ -9,7 +9,7 @@ pub fn target() -> Target {
|
||||
|
@ -66,19 +47,19 @@ index 9bc38a72f4d3..a7a36eb3c9d6 100644
|
|||
Target {
|
||||
- llvm_target: "i686-unknown-linux-gnu".into(),
|
||||
+ llvm_target: "i686-pc-linux-gnu".into(),
|
||||
pointer_width: 32,
|
||||
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
|
||||
i128:128-f64:32:64-f80:32-n8:16:32-S128"
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
description: None,
|
||||
tier: None,
|
||||
diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs
|
||||
index 2296b58f45dc..a54dbf573dd6 100644
|
||||
index 98374023dc57..0e08b8c32229 100644
|
||||
--- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs
|
||||
+++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs
|
||||
@@ -17,7 +17,7 @@ pub fn target() -> Target {
|
||||
@@ -18,7 +18,7 @@ pub fn target() -> Target {
|
||||
base.supports_xray = true;
|
||||
|
||||
Target {
|
||||
- llvm_target: "x86_64-unknown-linux-gnu".into(),
|
||||
+ llvm_target: "x86_64-pc-linux-gnu".into(),
|
||||
pointer_width: 64,
|
||||
data_layout:
|
||||
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
description: None,
|
||||
tier: None,
|
||||
|
|
|
@ -20,8 +20,8 @@ pkgname=(
|
|||
rust-src
|
||||
)
|
||||
epoch=1
|
||||
pkgver=1.77.2
|
||||
pkgrel=2
|
||||
pkgver=1.78.0
|
||||
pkgrel=1
|
||||
pkgdesc="Systems programming language focused on safety, speed and concurrency"
|
||||
url=https://www.rust-lang.org/
|
||||
arch=(x86_64)
|
||||
|
@ -31,13 +31,18 @@ options=(
|
|||
!lto
|
||||
)
|
||||
depends=(
|
||||
bash
|
||||
curl
|
||||
gcc
|
||||
gcc-libs
|
||||
glibc
|
||||
libssh2
|
||||
llvm-libs
|
||||
openssl
|
||||
zlib
|
||||
)
|
||||
makedepends=(
|
||||
clang
|
||||
cmake
|
||||
libffi
|
||||
lld
|
||||
|
@ -59,11 +64,11 @@ source=(
|
|||
0003-compiler-Change-LLVM-targets.patch
|
||||
0004-compiler-Use-wasm-ld-for-wasm-targets.patch
|
||||
)
|
||||
b2sums=('cf9fd96580d2c696e8d2992a5b4ee285824648bfa721212dd7691d63c876cf8fda1d50e924bec891af2c721e3746c4227fd23a0bed48e0b505fcd328936f5a35'
|
||||
b2sums=('3f43a1c50e268afbe76755ae24bccb3db9ff4dd8bbb8130c75d486c4c0e40f0253c4d4cad1de1040600c090d03d93b08adee5b16fa8abcf36d47a3c14024719f'
|
||||
'SKIP'
|
||||
'd3ed7043e288c78ac4007b267448457db0972905037754b67249d81be0889f47c4d93573c24d730907c31ec44e80ce696fbf50f98521eadee92c003d2324a1a3'
|
||||
'6afaf5bff729618aa35d84f20b1447694c887b84a406f55344864b9e8dce72f80467412c128b5309d5b962b605ca396b77a52f275dd35681ab50cbedc68f873a'
|
||||
'18ca47c350373d9a095aff9a658c61816a542bb391a2a8ddf582f25795a21e9fc344b3e71a2eed7b094610bb61d9658e5360ef2ace9441fd21e4193746d45be7'
|
||||
'ef56a70741bae70a95695b4d05d1a6395f545e671c9d016c7180732f69a09b828ff5e16964ef16f9ebec55dd778a1b50927275cd4c21a7b78ae4959946a0657c'
|
||||
'd20861a8a8e16d4bb0143f00d4beb42e2c52eeb2c1894e9f9c04e3d74ecd750d9bdacf15bb39fd0ade4487b9d3d14da24cf5f25ceab112f096fddcd329320a15'
|
||||
'64391cf17e7d801fb263e9d637928c3a2f6aa11aca6afbf115be4e38e9afce42371ed4884929cf11d6c74c2aa497fb26abbba1812d4f31f44dcda38e4978a33f'
|
||||
'23f399d5ea776df5dba1ec42a96020a7ae3b18f5a83121d90ca0256a90027529135bac751373a31480860c0dbad30598833a7da43d1e7f25ce5b6d5d945ce550')
|
||||
validpgpkeys=(
|
||||
108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE # Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>
|
||||
|
@ -87,7 +92,7 @@ prepare() {
|
|||
|
||||
cat >config.toml <<END
|
||||
profile = "user"
|
||||
change-id = 118703
|
||||
change-id = 121754
|
||||
|
||||
[llvm]
|
||||
link-shared = true
|
||||
|
@ -118,27 +123,16 @@ docs = false
|
|||
prefix = "/usr"
|
||||
|
||||
[rust]
|
||||
codegen-units-std = 1
|
||||
debuginfo-level = 1
|
||||
debuginfo-level-std = 0
|
||||
channel = "stable"
|
||||
description = "Arch Linux $pkgbase $epoch:$pkgver-$pkgrel"
|
||||
rpath = false
|
||||
deny-warnings = false
|
||||
backtrace-on-ice = true
|
||||
jemalloc = true
|
||||
|
||||
# Causes "error: --remap-path-prefix must contain '=' between FROM and TO"
|
||||
# even after creating the missing ~/.cargo/registry/src dir.
|
||||
# https://github.com/rust-lang/rust/issues/117885
|
||||
remap-debuginfo = false
|
||||
|
||||
# LLVM crashes when passing an object through ThinLTO twice. This is triggered
|
||||
# when using rust code in cross-language LTO if libstd was built using ThinLTO.
|
||||
# http://blog.llvm.org/2019/09/closing-gap-cross-language-lto-between.html
|
||||
# https://github.com/rust-lang/rust/issues/54872
|
||||
codegen-units-std = 1
|
||||
|
||||
# musl target produces warnings
|
||||
deny-warnings = false
|
||||
|
||||
[dist]
|
||||
compression-formats = ["gz"]
|
||||
|
||||
|
@ -202,24 +196,33 @@ build() {
|
|||
|
||||
[[ $CARCH == "aarch64" ]] && export JEMALLOC_SYS_WITH_LG_PAGE=16
|
||||
export RUST_BACKTRACE=1
|
||||
unset CFLAGS CXXFLAGS LDFLAGS
|
||||
|
||||
DESTDIR="$srcdir/dest-rust" python ./x.py install -j "$(nproc)"
|
||||
|
||||
cd ../dest-rust
|
||||
|
||||
# delete unnecessary files, e.g. files only used for the uninstall script
|
||||
rm usr/bin/*.old
|
||||
rm usr/lib/rustlib/{components,install.log,rust-installer-version,uninstall.sh}
|
||||
rm usr/lib/rustlib/manifest-*
|
||||
rm -v usr/lib/rustlib/{components,install.log,rust-installer-version,uninstall.sh}
|
||||
rm -v usr/lib/rustlib/manifest-*
|
||||
|
||||
# licenses for main rust package
|
||||
local ldir="usr/share/licenses/rust" f d
|
||||
mkdir -p "$ldir"
|
||||
for f in usr/share/doc/*/{COPYRIGHT,LICENSE}*; do
|
||||
d="$(dirname "$f")"
|
||||
case $f in
|
||||
*/LICENSE-APACHE) rm -v "$f" ;;
|
||||
*) mv -v "$f" "$ldir/${f##*/}.${d##*/}" ;;
|
||||
esac
|
||||
rmdir -p --ignore-fail-on-non-empty "$d"
|
||||
done
|
||||
|
||||
# rustbuild always installs copies of the shared libraries to /usr/lib,
|
||||
# overwrite them with symlinks to the per-architecture versions
|
||||
#mkdir -p usr/lib32
|
||||
#ln -srft usr/lib usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/*.so
|
||||
#ln -srft usr/lib32 usr/lib/rustlib/i686-unknown-linux-gnu/lib/*.so
|
||||
|
||||
mkdir -p usr/share/licenses/rust
|
||||
mv -t usr/share/licenses/rust usr/share/doc/rust/{COPYRIGHT,LICENSE*}
|
||||
#mkdir -pv usr/lib32
|
||||
#ln -srvft usr/lib usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/*.so
|
||||
#ln -srvft usr/lib32 usr/lib/rustlib/i686-unknown-linux-gnu/lib/*.so
|
||||
|
||||
#_pick dest-i686 usr/lib/rustlib/i686-unknown-linux-gnu usr/lib32
|
||||
#_pick dest-musl usr/lib/rustlib/x86_64-unknown-linux-musl
|
||||
|
@ -257,8 +260,8 @@ package_rust-src() {
|
|||
|
||||
cp -a dest-src/* "$pkgdir"
|
||||
|
||||
mkdir -p "$pkgdir/usr/share/licenses"
|
||||
ln -s rust "$pkgdir/usr/share/licenses/$pkgname"
|
||||
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 \
|
||||
rustc-$pkgver-src/{COPYRIGHT,LICENSE-MIT}
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
|
Loading…
Reference in a new issue