Skip to content

Commit

Permalink
rust: rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
ognevny committed Sep 29, 2024
1 parent ead31b7 commit 534a7c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 33 deletions.
14 changes: 0 additions & 14 deletions mingw-w64-rust/0002-use-system-libs-for-crossed-builds.patch

This file was deleted.

26 changes: 7 additions & 19 deletions mingw-w64-rust/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
$([[ ${CARCH} == i686 ]] || echo "${MINGW_PACKAGE_PREFIX}-rust-wasm")
"${MINGW_PACKAGE_PREFIX}-rust-src")
pkgver=1.81.0
pkgrel=3
pkgrel=4
pkgdesc="Systems programming language focused on safety, speed and concurrency (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32')
Expand Down Expand Up @@ -48,8 +48,6 @@ source=("${rust_dist_server}/${_realname}c-${pkgver}-src.tar.gz"{,.asc}
"${embed_manifest_url}"
"config.toml"
"0001-rustc-llvm-fix-libs.patch"
# remove the next time rust is rebuilt
"0002-use-system-libs-for-crossed-builds.patch"
"0004-compiler-Use-wasm-ld-for-wasm-targets.patch"
"0005-win32-config.patch"
"0008-disable-self-contained-for-gnu-targets.patch"
Expand All @@ -63,7 +61,6 @@ sha256sums=('872448febdff32e50c3c90a7e15f9bb2db131d13c588fe9071b0ed88837ccfa7'
'24ef6d949c0b5b1940c1d6a7aad78d86012152fb8845a1644bc939350d7b75e2'
'3254e26a03cbbe23ab77add05a3de8717b9711428330280dc3ee7a2c924d8c3c'
'7cb1773c288ffb1c1e751edc49b1890c84bf9c362742bc5225d19d474edb73a0'
'4ba4e63e7dfc78a215a0a5b1878d3e60988e9644c14e5581a09f3356dcb4ae6e'
'56882f1a0f1404c10c7726d6cc37444f2b343e72b969badfcb43760f80db0f32'
'7d1c4e49524b835a8eadc961b39f5594b12a522a1e24368999be2c7e85399e4e'
'98bc3f2bd7371a5b8d14fd7b03bf05574e206d1d9e52bcfbe66d71398504da3c'
Expand Down Expand Up @@ -112,11 +109,6 @@ prepare() {
0005-win32-config.patch \
0008-disable-self-contained-for-gnu-targets.patch

if [[ $MINGW_PACKAGE_PREFIX == *-clang-i686 || $MINGW_PACKAGE_PREFIX == *-clang-x86_64 ]]; then
apply_patch_with_msg \
0002-use-system-libs-for-crossed-builds.patch
fi

if [[ $MINGW_PACKAGE_PREFIX == *-clang-* ]]; then
apply_patch_with_msg \
0011-disable-uac-for-installer.patch
Expand All @@ -132,21 +124,17 @@ prepare() {
# https://github.com/rust-lang/rust/pull/128977
apply_patch_with_msg \
fix-bootstrap-on-windows.patch

# update windows-targets to support i686-pc-windows-gnullvm
if [[ ${MSYSTEM} == CLANG32 ]]; then
cd src/bootstrap
cargo update -p windows-targets@0.52.0 --precise 0.52.5
fi
}

build() {
mkdir -p "${srcdir}/${MSYSTEM}" && cd "${srcdir}/${MSYSTEM}"

# The ultimate hack to let the bootstrap compiler use libgcc* libs
if [[ $_bootstrapping != "no" ]] && [[ $MINGW_PACKAGE_PREFIX == *-clang-i686 || $MINGW_PACKAGE_PREFIX == *-clang-x86_64 ]]; then
export GCC_LIBS_HACK="$(cygpath -am build/missing-libs-hack)"
mkdir -p "${GCC_LIBS_HACK}"
cp "$(cygpath -u $(clang -print-libgcc-file-name))" "${GCC_LIBS_HACK}/libgcc.a"
cp "${MINGW_PREFIX}/lib/libunwind.a" "${GCC_LIBS_HACK}/libgcc_eh.a"
cp "${MINGW_PREFIX}/lib/libunwind.dll.a" "${GCC_LIBS_HACK}/libgcc_s.a"
export RUSTFLAGS_BOOTSTRAP="-C link-arg=-L$(cygpath -am build/missing-libs-hack)"
fi

# hack to inject the bootstrap compiler
if [[ $_bootstrapping != "no" && $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
mkdir -p "build/cache/${_stage0date}/"
Expand Down

0 comments on commit 534a7c7

Please sign in to comment.