Fix rust 1.14.0 (#2092)
* rust: link to pthread and use _Unwind_Resume * Rust now builds with system installed jemalloc. * Apparently there is no such package named llvm-libs. * Looks like we still need cmake
This commit is contained in:
@@ -6,38 +6,43 @@ _realname=rust
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=1.14.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Systems programming language focused on safety, speed and concurrency (mingw-w64)"
|
||||
arch=('any')
|
||||
url="https://www.rust-lang.org/"
|
||||
license=('MIT' 'Apache')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
|
||||
"${MINGW_PACKAGE_PREFIX}-libffi")
|
||||
makedepends=("git"
|
||||
"bison"
|
||||
"flex"
|
||||
"${MINGW_PACKAGE_PREFIX}-curl"
|
||||
"${MINGW_PACKAGE_PREFIX}-gcc"
|
||||
"${MINGW_PACKAGE_PREFIX}-libffi"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2"
|
||||
"${MINGW_PACKAGE_PREFIX}-cmake>=3.4.3"
|
||||
"${MINGW_PACKAGE_PREFIX}-llvm")
|
||||
"${MINGW_PACKAGE_PREFIX}-llvm"
|
||||
"${MINGW_PACKAGE_PREFIX}-jemalloc"
|
||||
"${MINGW_PACKAGE_PREFIX}-rust>=1.13.0"
|
||||
"${MINGW_PACKAGE_PREFIX}-cmake")
|
||||
options=('!makeflags' 'staticlibs')
|
||||
#install=rust.install
|
||||
source=(https://static.rust-lang.org/dist/${_realname}c-${pkgver}-src.tar.gz
|
||||
"force-curl-rust.patch"
|
||||
"force-curl-cargo.patch"
|
||||
"force-pthread.patch"
|
||||
"fix-jemalloc.patch"
|
||||
"git+https://github.com/rust-lang/cargo.git#tag=0.15.0")
|
||||
sha256sums=('c790edd2e915bd01bea46122af2942108479a2fda9a6f76d1094add520ac3b6b'
|
||||
'1325ffce8d8ea2b95ed1be0911d5730e82e879ca526422a0458f5da990fb04c1'
|
||||
'50c979b48ebc86dfddb295f2bea62e491ce868eb4308a0ae2324514c8d45e4fd'
|
||||
'7f32bd7c43f13a61b2e4f66c40be47fc5fd025b2aad3fa6507d20316b02e3c17'
|
||||
'9d5e57a67d98427eb3d34c2e19b3b9f5beadd5ddf62c76c2fd65905034eae84d'
|
||||
'SKIP')
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}/${_realname}c-${pkgver}
|
||||
patch -p1 -i "${srcdir}/force-curl-rust.patch"
|
||||
patch -p1 -i "${srcdir}/force-pthread.patch"
|
||||
patch -p1 -i "${srcdir}/fix-jemalloc.patch"
|
||||
|
||||
cd ${srcdir}/cargo
|
||||
git submodule update --init --recursive
|
||||
@@ -60,7 +65,8 @@ build() {
|
||||
--host=$OSTYPE \
|
||||
--target=$OSTYPE \
|
||||
--release-channel=stable \
|
||||
--llvm-root=${MINGW_PREFIX}
|
||||
--llvm-root=${MINGW_PREFIX} \
|
||||
--jemalloc-root=${MINGW_PREFIX}/lib
|
||||
|
||||
make RUSTFLAGS="$RUSTFLAGS -C link-args='-lffi -lpthread'"
|
||||
}
|
||||
|
||||
11
mingw-w64-rust/fix-jemalloc.patch
Normal file
11
mingw-w64-rust/fix-jemalloc.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/mk/rt.mk.3 2017-01-16 18:55:02.276272300 -0800
|
||||
+++ b/mk/rt.mk 2017-01-16 18:48:51.192313100 -0800
|
||||
@@ -217,7 +217,7 @@
|
||||
|
||||
ifeq ($(1),$$(CFG_BUILD))
|
||||
ifneq ($$(CFG_JEMALLOC_ROOT),)
|
||||
-$$(JEMALLOC_LIB_$(1)): $$(CFG_JEMALLOC_ROOT)/libjemalloc_pic.a
|
||||
+$$(JEMALLOC_LIB_$(1)): $$(CFG_JEMALLOC_ROOT)/libjemalloc.a
|
||||
@$$(call E, copy: jemalloc)
|
||||
$$(Q)cp $$< $$@
|
||||
else
|
||||
Reference in New Issue
Block a user