Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/build-support/mingw-w32-binutils/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'build-support/mingw-w32-binutils/PKGBUILD')
-rw-r--r--build-support/mingw-w32-binutils/PKGBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/build-support/mingw-w32-binutils/PKGBUILD b/build-support/mingw-w32-binutils/PKGBUILD
new file mode 100644
index 00000000..269fcd2b
--- /dev/null
+++ b/build-support/mingw-w32-binutils/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Felix Yan <felixonmars@archlinux.org>
+
+pkgname=mingw-w32-binutils
+pkgver=2.38
+pkgrel=3
+pkgdesc="Cross binutils for the MinGW-w32 cross-compiler"
+arch=(i486 i686 pentium4 'x86_64')
+url="http://www.gnu.org/software/binutils"
+license=('GPL')
+groups=('mingw-w32-toolchain' 'mingw-w32')
+depends=('zlib')
+options=('!libtool' '!emptydirs')
+validpgpkeys=('3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F') # Nick Clifton (Chief Binutils Maintainer) <nickc@redhat.com>
+source=("https://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.gz"{,.sig}
+ 99852365513266afdd793289813e8e565186c9e6.patch)
+sha512sums=('5160ff5c2a0ad41b880384216e21ada5328b51378e760c04269eb3b3626400d12abeeea72c14e18b52b969a0be94c8e5285c0b568bd5c82b7e69f68e0dfdc743'
+ 'SKIP'
+ 'cdce2ac2666fe27973152748a0108475bd1c0bbfa1559116d42c6badcdb0a60258b2a01180e0b37a65bef8df520a795d105eb80d88ce1846d006b5ea818b2c60')
+
+_targets="i686-w32-mingw32"
+
+prepare() {
+ cd "$srcdir"/binutils-${pkgver}
+ patch -p1 -i ../99852365513266afdd793289813e8e565186c9e6.patch
+ #do not install libiberty
+ sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
+}
+
+build() {
+ for _target in $_targets; do
+ echo "Building ${_target} cross binutils"
+ mkdir -p "$srcdir"/binutils-${_target} && cd "${srcdir}/binutils-${_target}"
+ "$srcdir"/binutils-${pkgver}/configure --prefix=/usr \
+ --target=${_target} \
+ --infodir=/usr/share/info/${_target} \
+ --enable-lto --enable-plugins \
+ --enable-deterministic-archives \
+ --disable-multilib --disable-nls \
+ --disable-werror
+ make -O
+ done
+}
+
+package() {
+ for _target in ${_targets}; do
+ echo "Installing ${_target} cross binutils"
+ cd "$srcdir"/binutils-${_target}
+ make DESTDIR="$pkgdir" install
+
+ rm "$pkgdir"/usr/lib/bfd-plugins/libdep.so
+ done
+}