aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/mingw-w64-binutils/APKBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/testing/mingw-w64-binutils/APKBUILD b/testing/mingw-w64-binutils/APKBUILD
new file mode 100644
index 0000000000..69bf3749af
--- /dev/null
+++ b/testing/mingw-w64-binutils/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Leo <thinkabit.ukim@gmail.com>
+# Maintainer: Leo <thinkabit.ukim@gmail.com>
+pkgname=mingw-w64-binutils
+pkgver=2.32
+pkgrel=0
+pkgdesc="Cross binutils for the MinGW-w64 cross-compiler"
+url="http://www.gnu.org/software/binutils"
+arch="x86_64 x86"
+license="GPL-3.0-or-later"
+makedepends="zlib-dev"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.gz"
+builddir="$srcdir/binutils-$pkgver"
+
+case "$CARCH" in
+ x86_64) _target="x86_64-w64-mingw32" ;;
+ x86) _target="i686-w64-mingw32" ;;
+esac
+
+# Directory for out-of-tree builds
+_binutilsdir="$srcdir/binutils-${_target}"
+
+prepare() {
+ default_prepare
+
+ # Do not install libiberty
+ sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
+ # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
+
+ mkdir -p "$_binutilsdir"
+}
+
+build() {
+ cd "$_binutilsdir"
+ "$builddir"/configure \
+ --prefix=/usr \
+ --target=${_target} \
+ --infodir=/usr/share/info/${_target} \
+ --enable-lto --enable-plugins \
+ --enable-deterministic-archives \
+ --disable-multilib --disable-nls \
+ --disable-werror
+ make
+}
+
+package() {
+ cd "$_binutilsdir"
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="0dbf26e648096f267715d645fed563690a83c55b67cc6da9b7991114aa816465207887688979b6bcdd247491fe45cf9b4827215229a1229563ba1eb2e5053783 mingw-w64-binutils-2.32.tar.gz"