mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-26 19:13:51 +02:00
rust: update to 1.35.0
[ci skip]
This commit is contained in:
parent
2f7aaa739c
commit
eaea45593f
8 changed files with 114 additions and 170 deletions
|
@ -1,58 +0,0 @@
|
|||
From faca3fbd15d0c3108493c3c54cd93138e049ac43 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 22:03:02 +0200
|
||||
Subject: [PATCH 3/3] musl
|
||||
|
||||
---
|
||||
include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++
|
||||
lib/Support/DynamicLibrary.cpp | 2 +-
|
||||
lib/Support/Unix/Signals.inc | 6 +++---
|
||||
utils/unittest/googletest/src/gtest.cc | 1 +
|
||||
5 files changed, 17 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h
|
||||
index e0a1ee3..465b65a 100644
|
||||
--- a/include/llvm/Analysis/TargetLibraryInfo.h
|
||||
+++ b/include/llvm/Analysis/TargetLibraryInfo.h
|
||||
@@ -18,6 +18,15 @@
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/Pass.h"
|
||||
|
||||
+#undef fopen64
|
||||
+#undef fseeko64
|
||||
+#undef fstat64
|
||||
+#undef fstatvfs64
|
||||
+#undef ftello64
|
||||
+#undef lstat64
|
||||
+#undef stat64
|
||||
+#undef tmpfile64
|
||||
+
|
||||
namespace llvm {
|
||||
/// VecDesc - Describes a possible vectorization of a function.
|
||||
/// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized
|
||||
diff --git a/utils/unittest/googletest/src/gtest.cc b/utils/unittest/googletest/src/gtest.cc
|
||||
index 5780764..1d548c1 100644
|
||||
--- a/utils/unittest/googletest/src/gtest.cc
|
||||
+++ b/utils/unittest/googletest/src/gtest.cc
|
||||
@@ -120,6 +120,7 @@
|
||||
|
||||
#if GTEST_CAN_STREAM_RESULTS_
|
||||
# include <arpa/inet.h> // NOLINT
|
||||
+# include <sys/socket.h> // NOLINT
|
||||
# include <netdb.h> // NOLINT
|
||||
#endif
|
||||
|
||||
--
|
||||
2.5.1
|
||||
|
||||
--- llvm-5.0.0.src/lib/Support/Unix/DynamicLibrary.inc.orig
|
||||
+++ llvm-5.0.0.src/lib/Support/Unix/DynamicLibrary.inc
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
// This macro returns the address of a well-known, explicit symbol
|
||||
#define EXPLICIT_SYMBOL(SYM) \
|
||||
- if (!strcmp(SymbolName, #SYM)) return &SYM
|
||||
+ if (!strcmp(SymbolName, #SYM)) return (void *)&SYM
|
||||
|
||||
// Under glibc we have a weird situation. The stderr/out/in symbols are both
|
||||
// macros and global variables because of standards requirements. So, we
|
|
@ -1,18 +0,0 @@
|
|||
This patches LLVM to use ELFv2 on ppc64 uncoditionally unless overridden. We
|
||||
need this because unlike most distros we use ELFv2 for both glibc and musl
|
||||
on big endian ppc64.
|
||||
|
||||
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
|
||||
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
|
||||
@@ -197,9 +197,9 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
|
||||
|
||||
switch (TT.getArch()) {
|
||||
case Triple::ppc64le:
|
||||
- return PPCTargetMachine::PPC_ABI_ELFv2;
|
||||
case Triple::ppc64:
|
||||
- return PPCTargetMachine::PPC_ABI_ELFv1;
|
||||
+ /* we use elfv2 by default for both endians and both libcs */
|
||||
+ return PPCTargetMachine::PPC_ABI_ELFv2;
|
||||
default:
|
||||
return PPCTargetMachine::PPC_ABI_UNKNOWN;
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
--- rustc-1.30.0-src/src/librustc_llvm/lib.rs.orig
|
||||
+++ rustc-1.30.0-src/src/librustc_llvm/lib.rs
|
||||
@@ -121,3 +121,10 @@
|
||||
LLVMInitializeWebAssemblyTargetMC,
|
||||
LLVMInitializeWebAssemblyAsmPrinter);
|
||||
}
|
||||
+
|
||||
+#[link(name = "ffi")]
|
||||
+extern {}
|
||||
+#[link(name = "z")]
|
||||
+extern {}
|
||||
+#[link(name = "ncursesw")]
|
||||
+extern {}
|
|
@ -1,13 +1,11 @@
|
|||
we use libgcc_s for unwind, no need for libunwind.a
|
||||
https://github.com/void-linux/void-packages/issues/3605
|
||||
|
||||
|
||||
--- rustc-1.28.0-src/src/libunwind/build.rs.orig 2018-10-11 10:37:16.617653976 +0200
|
||||
+++ rustc-1.28.0-src/src/libunwind/build.rs 2018-10-11 10:37:33.584492467 +0200
|
||||
@@ -15,9 +15,7 @@
|
||||
let target = env::var("TARGET").expect("TARGET was not set");
|
||||
|
||||
if target.contains("linux") {
|
||||
--- rustc-1.35.0-src/src/libunwind/build.rs
|
||||
+++ rustc-1.35.0-src/src/libunwind/build.rs
|
||||
@@ -11,9 +11,7 @@ fn main() {
|
||||
#[cfg(feature = "llvm-libunwind")]
|
||||
llvm_libunwind::compile();
|
||||
} else if target.contains("linux") {
|
||||
- if target.contains("musl") {
|
||||
- // musl is handled in lib.rs
|
||||
- } else if !target.contains("android") {
|
||||
|
@ -15,9 +13,9 @@ https://github.com/void-linux/void-packages/issues/3605
|
|||
println!("cargo:rustc-link-lib=gcc_s");
|
||||
}
|
||||
} else if target.contains("freebsd") {
|
||||
--- rustc-1.28.0-src/src/libunwind/lib.rs.orig 2018-10-11 10:37:51.012326568 +0200
|
||||
+++ rustc-1.28.0-src/src/libunwind/lib.rs 2018-10-11 10:38:03.512207577 +0200
|
||||
@@ -33,8 +33,3 @@
|
||||
--- rustc-1.35.0-src/src/libunwind/lib.rs
|
||||
+++ rustc-1.35.0-src/src/libunwind/lib.rs
|
||||
@@ -24,8 +24,3 @@ cfg_if! {
|
||||
pub use libunwind::*;
|
||||
}
|
||||
}
|
||||
|
@ -27,9 +25,9 @@ https://github.com/void-linux/void-packages/issues/3605
|
|||
-#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
|
||||
-extern {}
|
||||
|
||||
--- rustc-1.28.0-src/src/bootstrap/sanity.rs.orig 2018-10-11 10:29:34.169735519 +0200
|
||||
+++ rustc-1.28.0-src/src/bootstrap/sanity.rs 2018-10-11 10:30:02.467509880 +0200
|
||||
@@ -186,34 +186,6 @@
|
||||
--- rustc-1.35.0-src/src/bootstrap/sanity.rs
|
||||
+++ rustc-1.35.0-src/src/bootstrap/sanity.rs
|
||||
@@ -171,34 +171,6 @@ pub fn check(build: &mut Build) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,4 +62,3 @@ https://github.com/void-linux/void-packages/issues/3605
|
|||
if target.contains("msvc") {
|
||||
// There are three builds of cmake on windows: MSVC, MinGW, and
|
||||
// Cygwin. The Cygwin build does not have generators for Visual
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--- rustc-1.33.0-src/src/bootstrap/compile.rs
|
||||
+++ rustc-1.33.0-src/src/bootstrap/compile.rs
|
||||
@@ -114,21 +114,6 @@ impl Step for Std {
|
||||
fn copy_third_party_objects(builder: &Builder, compiler: &Compiler, target: Interned<String>) {
|
||||
--- rustc-1.35.0-src/src/bootstrap/compile.rs
|
||||
+++ rustc-1.35.0-src/src/bootstrap/compile.rs
|
||||
@@ -114,20 +114,7 @@ impl Step for Std {
|
||||
fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: Interned<String>) {
|
||||
let libdir = builder.sysroot_libdir(*compiler, target);
|
||||
|
||||
- // Copies the crt(1,i,n).o startup objects
|
||||
|
@ -17,14 +17,14 @@
|
|||
- &libdir.join(obj),
|
||||
- );
|
||||
- }
|
||||
- }
|
||||
-
|
||||
// Copies libunwind.a compiled to be linked wit x86_64-fortanix-unknown-sgx.
|
||||
//
|
||||
// This target needs to be linked to Fortanix's port of llvm's libunwind.
|
||||
--- rustc-1.33.0-src/vendor/libc/src/unix/mod.rs
|
||||
+++ rustc-1.33.0-src/vendor/libc/src/unix/mod.rs
|
||||
@@ -317,13 +317,6 @@ cfg_if! {
|
||||
- } else if target.ends_with("-wasi") {
|
||||
+ if target.ends_with("-wasi") {
|
||||
for &obj in &["crt1.o"] {
|
||||
builder.copy(
|
||||
&builder.wasi_root(target).unwrap().join("lib/wasm32-wasi").join(obj),
|
||||
--- rustc-1.35.0-src/vendor/libc/src/unix/mod.rs
|
||||
+++ rustc-1.35.0-src/vendor/libc/src/unix/mod.rs
|
||||
@@ -306,13 +306,6 @@ cfg_if! {
|
||||
} else if #[cfg(feature = "use_std")] {
|
||||
// cargo build, don't pull in anything extra as the libstd dep
|
||||
// already pulls in all libs.
|
||||
|
|
|
@ -3,8 +3,8 @@ LLVM. While this is not perfect (it does not allow rustc to compile legacy
|
|||
binaries), rustc never requests specific ABI from llvm in the first place,
|
||||
so at least match the environment we have.
|
||||
|
||||
--- a/src/librustc_target/abi/call/powerpc64.rs
|
||||
+++ b/src/librustc_target/abi/call/powerpc64.rs
|
||||
--- rustc-1.35.0-src/src/librustc_target/abi/call/powerpc64.rs
|
||||
+++ rustc-1.35.0-src/src/librustc_target/abi/call/powerpc64.rs
|
||||
@@ -124,7 +124,7 @@ pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<'a, Ty>)
|
||||
where Ty: TyLayoutMethods<'a, C> + Copy,
|
||||
C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout + HasTargetSpec
|
||||
|
@ -14,11 +14,11 @@ so at least match the environment we have.
|
|||
ELFv2
|
||||
} else {
|
||||
match cx.data_layout().endian {
|
||||
--- a/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
|
||||
+++ b/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
|
||||
--- rustc-1.35.0-src/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
|
||||
+++ rustc-1.35.0-src/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
|
||||
@@ -1,4 +1,4 @@
|
||||
-use crate::spec::{LinkerFlavor, Target, TargetResult, RelroLevel};
|
||||
+use crate::spec::{LinkerFlavor, Target, TargetResult};
|
||||
-use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult, RelroLevel};
|
||||
+use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::linux_base::opts();
|
||||
|
|
|
@ -1,78 +1,73 @@
|
|||
# Template file for 'rust'
|
||||
pkgname=rust
|
||||
version=1.34.2
|
||||
version=1.35.0
|
||||
revision=1
|
||||
_rust_dist_version=1.33.0
|
||||
_cargo_dist_version=0.33.0
|
||||
# NB. if you push any(!) new version, don't forget to put a build
|
||||
# output of musl to https://alpha.de.repo.voidlinux.org/distfiles/
|
||||
_rust_dist_version=1.35.0
|
||||
_cargo_dist_version=0.36.0
|
||||
# Always make sure custom distfiles used for bootstrap are
|
||||
# uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
|
||||
wrksrc="rustc-${version}-src"
|
||||
build_style=configure
|
||||
make_build_args="dist VERBOSE=1"
|
||||
hostmakedepends="cmake curl pkg-config python"
|
||||
makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel
|
||||
$(vopt_if internal_llvm python-devel llvm)"
|
||||
makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm"
|
||||
depends="rust-std"
|
||||
short_desc="Safe, concurrent, practical systems language"
|
||||
maintainer="Enno Boland <gottox@voidlinux.org>"
|
||||
license="MIT, Apache-2.0"
|
||||
homepage="https://www.rust-lang.org/"
|
||||
distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
|
||||
checksum=c69a4a85a1c464368597df8878cb9e1121aae93e215616d45ad7d23af3052f56
|
||||
checksum=5a4d637a716bac18d085f44dd87ef48b32195f71b967d872d80280b38cff712d
|
||||
lib32disabled=yes
|
||||
patch_args="-Np1"
|
||||
|
||||
build_options="internal_llvm"
|
||||
build_options="static_llvm"
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
hostmakedepends+=" cargo $(vopt_if internal_llvm '' llvm)"
|
||||
|
||||
hostmakedepends+=" cargo llvm"
|
||||
# These are required for building the buildhost's stage0/1
|
||||
hostmakedepends+=" libffi-devel libxml2-devel
|
||||
ncurses-devel zlib-devel"
|
||||
hostmakedepends+=" libffi-devel libxml2-devel ncurses-devel zlib-devel"
|
||||
else
|
||||
case "$XBPS_MACHINE" in
|
||||
x86_64-musl)
|
||||
distfiles+="
|
||||
https://alpha.de.repo.voidlinux.org/distfiles/rustc-${_rust_dist_version}-x86_64-unknown-linux-musl.tar.xz
|
||||
https://alpha.de.repo.voidlinux.org/distfiles/rust-std-${_rust_dist_version}-x86_64-unknown-linux-musl.tar.xz
|
||||
https://alpha.de.repo.voidlinux.org/distfiles/cargo-${_cargo_dist_version}-x86_64-unknown-linux-musl.tar.xz"
|
||||
https://static.rust-lang.org/dist/rustc-${_rust_dist_version}-x86_64-unknown-linux-musl.tar.xz
|
||||
https://static.rust-lang.org/dist/rust-std-${_rust_dist_version}-x86_64-unknown-linux-musl.tar.xz
|
||||
https://static.rust-lang.org/dist/cargo-${_cargo_dist_version}-x86_64-unknown-linux-musl.tar.xz"
|
||||
checksum+="
|
||||
27133fe50d7f43009b802d608654c828e4589cf27810fd7151b67de7de3706e0
|
||||
6971b0b9147371eaf81ece7ac6ee91d2f7adbbd3129b9a80170f394c9a35636a
|
||||
7d3e669dc5ddde7529ab0df2d0397648a679426fc56dd4c93d94f84fd68366d5"
|
||||
961df84a116c7b1b11eb912d33c8edb233b76980f97983f9ed3989621f9f90c3
|
||||
3574e0d43b2746ea0cb9f8084670699f5cb920cee646026cec1da152818c51ba
|
||||
0466ed241c44d137ee65aa7dbba8fc1cc94e56b252c323c387523b5cb430210e"
|
||||
;;
|
||||
x86_64)
|
||||
# extract from src/stage0.txt
|
||||
distfiles+="
|
||||
https://static.rust-lang.org/dist/rustc-${_rust_dist_version}-x86_64-unknown-linux-gnu.tar.gz
|
||||
https://static.rust-lang.org/dist/rust-std-${_rust_dist_version}-x86_64-unknown-linux-gnu.tar.gz
|
||||
https://static.rust-lang.org/dist/cargo-${_cargo_dist_version}-x86_64-unknown-linux-gnu.tar.xz"
|
||||
checksum+="
|
||||
54a342f718b712d8a17fd7878ebd37d22a82ebc70b59c421168cd4153fd04c2b
|
||||
661c2ba717ae1502f002b4c6e7aeb8941685c7ea8fe7ac26ed9ede26f615b7af
|
||||
c2c31db68c4dcb50ad856a19e6f11489a0d4df1212f31bd068dfbb73c5425761"
|
||||
bb3a07a1f2fdc3eeeee25fc40131d3f05494e3838dfd4e9275475ffc500d7a9e
|
||||
5dfa92661ff1a22680785bd6999b6117ae66841e2bd9e5318eb97002956131e4
|
||||
ab5a6ff1947463dbd2477ca5dac2012494dae821112098ae0c54add652adfdc3"
|
||||
;;
|
||||
i686)
|
||||
# extract from src/stage0.txt
|
||||
distfiles+="
|
||||
https://static.rust-lang.org/dist/rustc-${_rust_dist_version}-i686-unknown-linux-gnu.tar.gz
|
||||
https://static.rust-lang.org/dist/rust-std-${_rust_dist_version}-i686-unknown-linux-gnu.tar.gz
|
||||
https://static.rust-lang.org/dist/cargo-${_cargo_dist_version}-i686-unknown-linux-gnu.tar.xz"
|
||||
checksum+="
|
||||
be4cdc82b511b0f2499fc9b7048b01069257ca2dedb270a7938e1846beb5a349
|
||||
f4bba5b77c61a30f0a4c83e152f216c62f974185c4c012c295a5d19d44381a62
|
||||
13acdb3c9f2505805ceed8a696f5f62ab8cd73e443cd43d6edd588aad88e1c32"
|
||||
b05ca05cfb6f106f92283bb06158845f29abb3c1145a8dc306d2aa210f42d106
|
||||
ab41c886af02a16a9a38780043d7f3da24c637629afa222b38f616fe6de86402
|
||||
4c1521691a22e24e40aac18e75ea95957477284adda9ad79df64d56861aec610"
|
||||
;;
|
||||
ppc64le)
|
||||
distfiles+="
|
||||
https://static.rust-lang.org/dist/rustc-${_rust_dist_version}-powerpc64le-unknown-linux-gnu.tar.xz
|
||||
https://static.rust-lang.org/dist/rust-std-${_rust_dist_version}-powerpc64le-unknown-linux-gnu.tar.xz
|
||||
https://alpha.de.repo.voidlinux.org/distfiles/cargo-${_cargo_dist_version}-powerpc64le-unknown-linux-gnu.tar.xz"
|
||||
https://static.rust-lang.org/dist/cargo-${_cargo_dist_version}-powerpc64le-unknown-linux-gnu.tar.xz"
|
||||
checksum+="
|
||||
75ef3992b3de501f0b3442315e6ddef9d6f10070174fdd0f3d62e87534fddbc5
|
||||
984d3ca2a47db04345a2bddd657761f66d209ef95a02097ad4bd549f45a0dc9f
|
||||
03ece4d677ad59f08a514eb90dd3bd6cad4399fbbaf3d0e916323fbce38e25d1"
|
||||
fd7709e00ff49d8e388f52c92a386cef075897b4363e76bec1c850d8d5d67145
|
||||
b09fe43521f1e50d4b40eb8b4803a5d49dc9c5447eb0ef4da1ab723c093877ba
|
||||
46419ba92849bcf8f4970ae042c333c1d82c1e18fda0531a745f88baee0e7f22"
|
||||
;;
|
||||
ppc64le-musl)
|
||||
distfiles+="
|
||||
|
@ -80,9 +75,19 @@ else
|
|||
https://alpha.de.repo.voidlinux.org/distfiles/rust-std-${_rust_dist_version}-powerpc64le-unknown-linux-musl.tar.xz
|
||||
https://alpha.de.repo.voidlinux.org/distfiles/cargo-${_cargo_dist_version}-powerpc64le-unknown-linux-musl.tar.xz"
|
||||
checksum+="
|
||||
f3a493414b07e9b1b535269cd39552ece586ccad3bfadddd92a952e08179844d
|
||||
698dbec4d359bb4a378eef807035c9b0b4fffe478e50af044ae47b485b9b6f8e
|
||||
801490f04eac96e883f56434747042c375aa3d210b224c2735e02a3a1eab95a0"
|
||||
1e2831db0a45c3e3bd44f375678a1738407cf8f7d44af9fd3444248bc1b5d574
|
||||
0bf05a5d0521dec481d67ea3a74626e884fd18f8215b774ba89d818bbdb3d8c0
|
||||
9347f6c8b391e0142cda60988690f7bc9a877f8012ea2e71c35343a4cb9b7ee4"
|
||||
;;
|
||||
ppc64)
|
||||
distfiles+="
|
||||
https://alpha.de.repo.voidlinux.org/distfiles/rustc-${_rust_dist_version}-powerpc64-unknown-linux-gnu.tar.xz
|
||||
https://alpha.de.repo.voidlinux.org/distfiles/rust-std-${_rust_dist_version}-powerpc64-unknown-linux-gnu.tar.xz
|
||||
https://alpha.de.repo.voidlinux.org/distfiles/cargo-${_cargo_dist_version}-powerpc64-unknown-linux-gnu.tar.xz"
|
||||
checksum+="
|
||||
7ba9b81bdc3bda8e0945d37424c5a47364961f90c4765d5223afe8c7ae865d78
|
||||
abb807fbb6c3ca86f9f05014581b84a8105e2fc4ecdac33817093ba6fdb5c613
|
||||
512c69762fe2a18b6d9781186e77f76333f7ac179e76135cb85ba19e703afaca"
|
||||
;;
|
||||
ppc64-musl)
|
||||
distfiles+="
|
||||
|
@ -90,9 +95,29 @@ else
|
|||
https://alpha.de.repo.voidlinux.org/distfiles/rust-std-${_rust_dist_version}-powerpc64-unknown-linux-musl.tar.xz
|
||||
https://alpha.de.repo.voidlinux.org/distfiles/cargo-${_cargo_dist_version}-powerpc64-unknown-linux-musl.tar.xz"
|
||||
checksum+="
|
||||
56805b5a8a7a2d07937ab12a00154a64bf756d0c85d0d69573bc27365fc3157b
|
||||
e9e15702928f2633b1b971911c992c5ed5c552cf4a05f40bc177e53daa05a764
|
||||
ae90844974681c3ee85a855ae0ed27f06d22215e40f825f3b7ca705d8a7cfe7b"
|
||||
fa843921197f51a9c5042528789531daef0e89b7b861cf94116d079bbfc2a523
|
||||
01145b57d2e11ca7bd06dd57a8582ac5d34c683a9cd827920f2489dbdbc51539
|
||||
9b8cdacbb4859addfe63cf8ea1df9eb32343e25a18bef2a6422f990728d0e78a"
|
||||
;;
|
||||
ppc)
|
||||
distfiles+="
|
||||
https://static.rust-lang.org/dist/rustc-${_rust_dist_version}-powerpc-unknown-linux-gnu.tar.xz
|
||||
https://static.rust-lang.org/dist/rust-std-${_rust_dist_version}-powerpc-unknown-linux-gnu.tar.xz
|
||||
https://static.rust-lang.org/dist/cargo-${_cargo_dist_version}-powerpc-unknown-linux-gnu.tar.xz"
|
||||
checksum+="
|
||||
194ae7493942b5b291870c5857a1e3126b95b6f3b028d5cbfe997f10875a78c4
|
||||
901b169e011b6d2f675939c014165330756acd5bf2233c4c770229712cd9f19e
|
||||
42b997dc8b562241d563993b11c070394cf48ced55c6cf86c387d0a15ff0847e"
|
||||
;;
|
||||
ppc-musl)
|
||||
distfiles+="
|
||||
https://alpha.de.repo.voidlinux.org/distfiles/rustc-${_rust_dist_version}-powerpc-unknown-linux-musl.tar.xz
|
||||
https://alpha.de.repo.voidlinux.org/distfiles/rust-std-${_rust_dist_version}-powerpc-unknown-linux-musl.tar.xz
|
||||
https://alpha.de.repo.voidlinux.org/distfiles/cargo-${_cargo_dist_version}-powerpc-unknown-linux-musl.tar.xz"
|
||||
checksum+="
|
||||
163dfdeaeda1237a37c59b436d0288529da3277098286d7d92aa577a3e658433
|
||||
e47a378ddd4d54520c2ae1a8aba74ec2933ce33a5ce30687ef14ef0303085207
|
||||
eee6637b48d9bbf6375a2de75e36b8670fae26d8da9c53a9890380b9a29d0bcf"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
@ -104,13 +129,7 @@ post_extract() {
|
|||
cp -bflr ../rustc-*/rustc/* stage0
|
||||
rm ../rust-std-*/rust-std-*/manifest.in
|
||||
cp -bflr ../rust-std-*/rust-std-*/* stage0
|
||||
case "$XBPS_MACHINE" in
|
||||
*-musl|ppc64*) cp -bflr ../cargo stage0/bin;;
|
||||
*)
|
||||
rm ../cargo-*/cargo/manifest.in
|
||||
cp -flr ../cargo-*/cargo/* stage0
|
||||
;;
|
||||
esac
|
||||
cp -bflr ../cargo-${_cargo_dist_version}-${RUST_TARGET}/cargo/bin/cargo stage0/bin
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -122,18 +141,9 @@ _clear_vendor_checksums() {
|
|||
}
|
||||
|
||||
post_patch() {
|
||||
if [ "$build_option_internal_llvm" ]; then
|
||||
# patches for Rust's bundled LLVM
|
||||
pushd src/llvm-project/llvm
|
||||
for x in ${FILESDIR}/patches/internal-llvm/llvm-*.patch; do
|
||||
msg_normal "Applying $x to llvm\n"
|
||||
patch -sNp1 -i ${x}
|
||||
done
|
||||
popd
|
||||
else
|
||||
rm -rf src/llvm-project
|
||||
# patches for system LLVM
|
||||
for x in ${FILESDIR}/patches/sys-llvm/*.patch; do
|
||||
rm -rf src/llvm-project
|
||||
if [ "$build_option_static_llvm" ]; then
|
||||
for x in ${FILESDIR}/patches/static-llvm/*.patch; do
|
||||
msg_normal "Applying patch $x\n"
|
||||
patch -sNp1 -i ${x}
|
||||
done
|
||||
|
@ -160,13 +170,14 @@ do_configure() {
|
|||
--disable-docs
|
||||
--disable-codegen-tests
|
||||
--enable-vendor
|
||||
--llvm-root=/usr
|
||||
--set=target.${RUST_BUILD}.llvm-config=/usr/bin/llvm-config
|
||||
--set=target.${RUST_TARGET}.llvm-config=/usr/bin/llvm-config
|
||||
--set=target.${RUST_TARGET}.crt-static=false
|
||||
"
|
||||
|
||||
if ! [ "$build_option_internal_llvm" ]; then
|
||||
if [ ! "$build_option_static_llvm" ]; then
|
||||
configure_args+="
|
||||
--llvm-root=/usr
|
||||
--set=target.${RUST_BUILD}.llvm-config=/usr/bin/llvm-config
|
||||
--set=target.${RUST_TARGET}.llvm-config=/usr/bin/llvm-config
|
||||
--enable-llvm-link-shared
|
||||
"
|
||||
fi
|
||||
|
@ -209,7 +220,6 @@ pre_build() {
|
|||
# Set the correct CFLAGS for the build host, we have to compile libbacktrace
|
||||
# for it during stage1. Otherwise it attemps to use CFLAGS, which are the CFLAGS
|
||||
# of the cross host.
|
||||
# Unset LDFLAGS, otherwise cross builds to the same arch will fail
|
||||
do_build() {
|
||||
env CFLAGS_${RUST_BUILD}="${CFLAGS_host}" make ${makejobs} ${make_build_args}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue