summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorpingplug2019-07-26 11:41:20 +0800
committerpingplug2019-07-26 11:41:20 +0800
commitf5b268ac32fc8d52b6cf83b817e3eca79627133f (patch)
tree0748d8bb2f1f0c344bb42cf42487b609a041a933 /PKGBUILD
parent9081bc0cfbb4b0ae308f9399a7c60eef4efc8d24 (diff)
downloadaur-f5b268ac32fc8d52b6cf83b817e3eca79627133f.tar.gz
use system MinGW provided crt2.o and dllcrt2.o
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD10
1 files changed, 9 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f188f0d0169a..9d3099a7636b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@ _cargo=0.37.0
pkgname=mingw-w64-rust-bin
pkgver=1.36.0
-pkgrel=1
+pkgrel=2
pkgdesc="Systems programming language focused on safety, speed and concurrency (PLEASE READ COMMENTS FIRST) (official build, mingw-w64)"
arch=('x86_64')
url="https://www.rust-lang.org"
@@ -93,6 +93,14 @@ package() {
ln -sf "../../../opt/${_pkgname}/lib/rustlib/x86_64-pc-windows-gnu/lib/"*.dll .
popd
+ # use system MinGW provided crt2.o and dllcrt2.o
+ pushd "${pkgdir}/opt/${_pkgname}/lib/rustlib/i686-pc-windows-gnu/lib"
+ ln -sf "../../../../../../usr/i686-w64-mingw32/lib/"{crt2.o,dllcrt2.o} .
+ popd
+ pushd "${pkgdir}/opt/${_pkgname}/lib/rustlib/x86_64-pc-windows-gnu/lib"
+ ln -sf "../../../../../../usr/x86_64-w64-mingw32/lib/"{crt2.o,dllcrt2.o} .
+ popd
+
# strip
strip --strip-all "${pkgdir}/opt/${_pkgname}/bin/"{cargo,rustc,rustdoc}
strip --strip-all "${pkgdir}/opt/${_pkgname}/lib/rustlib/x86_64-unknown-linux-gnu/bin/"rust-lld