blob: 69bf3749aff18ab0ec7b76f048556fe532a49840 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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"
|