summaryrefslogtreecommitdiff
path: root/adapted/binutils-ia16/PKGBUILD
blob: 4db5d65ddff0c06a600c6cf9f56e2cf848c44e7d (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
# Maintainer: Sebastiaan de Schaetzen <sebastiaan.de.schaetzen@gmail.com>
pkgname=binutils-ia16
pkgver=20230531
pkgrel=1
epoch=
pkgdesc="IA-16 (Intel 16-bit x86) port of GNU Binutils"
arch=('x86_64')
url="https://github.com/tkchia/binutils-ia16"
license=('GPL')
depends=(glibc zlib)
checkdepends=(dejagnu bc)
options=(staticlibs !distcc !ccache)
source=("https://github.com/tkchia/binutils-ia16/archive/refs/tags/$pkgver.tar.gz")
md5sums=('6ca9cae3761a39a55313468ac6356d81')

build() {
	mkdir -p build-binutils
	cd build-binutils
	unset CPPFLAGS
	../binutils-ia16-$pkgver/configure \
		--prefix=/usr \
		--target=ia16-elf \
		--enable-ld=default \
		--enable-gold=yes \
		--enable-targets=ia16-elf \
		--enable-x86-hpa-segelf=yes \
		--bindir=/usr/bin \
		--libdir=/usr/lib/ia16-elf \
		--disable-gdb \
		--disable-libdecnumber \
		--disable-readline \
		--disable-sim \
		--disable-nls \
		--disable-werror
	make configure-host
	make tooldir=/usr
}

check() {
	cd build-binutils
	# some debugging tests fail currently
	make -k check || :
}

package() {
	cd build-binutils
	make DESTDIR="$pkgdir/" install
	rm -rf "$pkgdir/usr/share"
}