blob: 017f080e365a0ff71edf0f88b6af79bbbd3ae726 (
plain) (
blame)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
# Maintainer: Adelie Platform Group <adelie-devel@lists.adelielinux.org>
pkgname=binutils
pkgver=2.41
pkgrel=1
pkgdesc="Tools necessary to build programs"
url="https://www.gnu.org/software/binutils/"
arch="all"
license="GPL-2.0+ AND GPL-3.0+ AND LGPL-2.0+ AND LGPL-2.1+ AND LGPL-3.0+ AND BSD-3-Clause"
depends=""
makedepends_build="byacc flex texinfo"
makedepends_host="zlib-dev"
makedepends="$makedepends_build $makedepends_host"
checkdepends="dejagnu"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-libs"
source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
binutils-ld-fix-static-linking.patch
disable-ifunc-tests.patch
disable-mbind2b.patch
disable-pr26580-test.patch
disable-preinit-array-tests.patch
disable-relr-glibc-tests.patch
disable-sframe-tests.patch
disable-textrel-test.patch
fix-pr28158-test.patch
libctf-32bit-test.patch
musl-preinit-array.patch
musl-versioned-syms.patch
ppc32-pic-required.patch
ppc64-abiv2-addr2line.patch
pr25749-test-size.patch
remove-pr2404-tests.patch
remove-pr19719-test.patch
remove-pr19553c-test.patch
skip-thumb-plt-musl.patch
vers-tests-eabi.patch
visibility-musl.patch
vsb-hammer.patch
BTS-170.patch
BTS-196.patch
fix-deprecated-egrep-usage.patch
"
if [ "$CHOST" != "$CTARGET" ]; then
pkgname="$pkgname-$CTARGET_ARCH"
subpackages=""
options="!check"
sonameprefix="$pkgname:"
builddir="$srcdir"/binutils-$pkgver
fi
# secfixes: binutils
# 2.28-r1:
# - CVE-2017-7614
# 2.31.1-r2:
# - CVE-2018-19931
# - CVE-2018-19932
# 2.32-r0:
# - CVE-2018-1000876
# 2.32-r2:
# - CVE-2019-9070
# - CVE-2019-9071
# - CVE-2019-9073
# - CVE-2019-9074
# - CVE-2019-9075
# - CVE-2019-9077
# - CVE-2019-12972
# - CVE-2019-14250
# 2.32-r3:
# - CVE-2019-14444
# 2.32-r5:
# - CVE-2019-17450
# - CVE-2019-17451
build() {
_sysroot=/
_cross_configure="--enable-install-libiberty"
_arch_configure=""
if [ "$CHOST" != "$CTARGET" ]; then
_sysroot="$CBUILDROOT"
_cross_configure="--disable-install-libiberty"
fi
# -z separate-code is currently causing kernel miscompiles on x86*
case "$CTARGET_ARCH" in
x86 | pmmx | i528) _arch_configure="--disable-separate-code" ;;
x86_64) _arch_configure="--disable-separate-code --enable-targets=x86_64-pep" ;;
esac
case "$CTARGET_ARCH" in
mips*) _hash_style_configure="--enable-default-hash-style=sysv" ;;
*) _hash_style_configure="--enable-default-hash-style=gnu" ;;
esac
./configure \
--build=$CBUILD \
--host=$CHOST \
--target=$CTARGET \
--with-build-sysroot="$CBUILDROOT" \
--with-sysroot=$_sysroot \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--disable-multilib \
--enable-shared \
--enable-ld=default \
--enable-64-bit-bfd \
--enable-plugins \
--enable-relro \
--enable-gprofng=no \
--disable-gold \
--enable-deterministic-archives \
$_cross_configure \
$_arch_configure \
$_hash_style_configure \
--disable-werror \
--with-system-zlib \
--enable-lto
make
}
check() {
make check
}
package() {
make install DESTDIR="$pkgdir"
if [ -d "$pkgdir"/usr/lib64 ]; then
die "Something really bad happened."
mv "$pkgdir"/usr/lib64/* "$pkgdir"/usr/lib/
rmdir "$pkgdir"/usr/lib64
fi
if [ "$CHOST" != "$CTARGET" ]; then
# creating cross tools: remove any files that would conflict
# with the native tools, or other cross tools
rm -r "$pkgdir"/usr/share
rm -f "$pkgdir"/usr/lib/libiberty.a
fi
}
libs() {
pkgdesc="Runtime libraries from binutils"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/lib*.so "$subpkgdir"/usr/lib/
}
sha512sums="5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374 binutils-2.41.tar.xz
ced667e95bfec8909e20802cd3d734b0b179bfc9d995dd68827a471ab9a4fdc38397f3d947dcae1bf2368a73480be3f18d4ec6b757ac7fdb9ee358693cc0670f binutils-ld-fix-static-linking.patch
ae54a3728b6e674febf130979a434f525b77f93103eef9c023647a68eaf5b607dfe264ab553d2132f46e93956959d1adf71bbd176e80a42a33329e62f6f55c3e disable-ifunc-tests.patch
de3f50afe2b0962d1f52f154871285e9c6d7b5599b745365a8f14fd237c7b1d6a066d0d081ce67ad1317b37bae2875f27adfea52f3853d7e30003e74a84075c2 disable-mbind2b.patch
cbbb9d62f53b1f93bb7d5728e0fe7ef0ebb18f388bc228b396e4df8ce5dd1079e0d7ca0afb2928f6f1beba30475e7f68fe345daffab3cb3ef607ca5bdd87915d disable-pr26580-test.patch
4c8098df5c01579d1c53c0344bf5e0f1c3b11bc119da077d83e87f7d103ed958e78083f94e71b12521c5f0cb83b3dda509efadc4124bcc28b436b39245ab4603 disable-preinit-array-tests.patch
b2d5da2705366f5919d3f8310225620493b88406b6e909ddf9bd8c9ef50f13757816ff2947eb33c1832048fd1d42c3a2593c909ee35f2fdc947f8e2df5500c7b disable-relr-glibc-tests.patch
e8ebb984e9b13b75114c8092d1ad2d0c1b3bb59bf10e66ca250151e79844125a23f74b8c4142210c8e574785c35e0ee1df0499e0cfd6ef59e8e80d58121963e1 disable-sframe-tests.patch
8213bc7e965b7c93e24c755e3ca47c522e3ba0d8504ec1def58fad398dd215158740164276ec8a0b48f2058c7025b5b8b6b2e16e646baf4f7dc1841d4fc5a504 disable-textrel-test.patch
2972b86e1741866db244cd262469eaef244fc3fb0d569b58cb1ad427d31b3ffc9ccbde904e7bd78f10367a5bfe8ec7f4076253abe03edbabbb0e5894ccc20487 fix-pr28158-test.patch
4948b963906a72075873f2988289294f6c1eb60297ac2bdee5d8646ad8a23f8f16d98b3e4f048fb625d347be28028a87247241a8dca030b4847450951b7aca32 libctf-32bit-test.patch
8ef144efc8c0cc71b48d7ed9444fa70906c9a4894058588e3f49c1826975675ab8091681912a15ecbed6772aa5bba31935c92abef0095548fc8a9ecaa5d26526 musl-preinit-array.patch
ab4d03394073bb6dbd4a046637e9bf57f8b4dad163c551b0d9bb2202025b243161149c8622c2fae072c43082bbf19e15b667483831a58a5d1bc93b464763cdcc musl-versioned-syms.patch
7b5ee15c9e5a3567cb000a4ac07699f9d0f11354cf5ee20fd375e483945fd45d0e1551f3f28bdb8ebb49355b3180cc90977e81ae0c3c210cdc689add504952a7 ppc32-pic-required.patch
5456d4d6c1097f41e5c02d92ed83acf608eb05d912cf4d289e8f772e8eded9af2030c518b7a89133ef3905d084fc5354ec140e472c22fe11c6802c1e9a4237e7 ppc64-abiv2-addr2line.patch
c76733b76daf5d4af17464777cb753c68063fdc6040d943962c78182ca65f46a2744d4437f6cc3b8ff5f09ff8c0f582690b7dc89eaaf4da48f9300a81b8b3803 pr25749-test-size.patch
b97aa6fd5a0b5b71dadd7d9925a0642681ce96bb98348a01c5778e4e6570bd2e135ff0252dec6568e19df329fb1a36bcf495d332c0207573fe2e6e5842283d27 remove-pr2404-tests.patch
ac8d30f5af82653242355d7bb0835823ea474bc6d349df4a2e6db91d90f8f80ccab1ff4ede6734af76e79da2e083a1a90cb9ae0631e3d62d89bc5f5a57c24c92 remove-pr19719-test.patch
06f9df891a4ae0e9f6f8b3282d3691ede7cc0f08d63bf722f942f3c94dd4d7f3907b7bb5a8087e63639569e61aed6c39b5f5da7ad6566e7ef278524aa32ada63 remove-pr19553c-test.patch
bdfc92cdd6c31a68e09daf71e3c45900158f8222832bda14cb2f12d9d693e6f19fe00dd29a7af9850bf0a19afe6ef421a690195f1a4e96d3cc76370f1e3bd399 skip-thumb-plt-musl.patch
52f250970ba6814a7a992f6ad4a7c8bfbc9b5f0a0c422c920edf8b6c3dfbc353d13be940483bbbce1bfc543572c2abb06015df61a68a640774b827810d0dde6b vers-tests-eabi.patch
075565f9bc85c0fc4bd36c7a848f6b876b71fbbe0f572b5c21961687ab4e2cd00c784fba09fe92b214c4b1df871ebd6409e6c93dde5a0a6c1ef6e41a30b24520 visibility-musl.patch
55bdb08f93563449b170ba8623cd7d4409c8f22abb15fca23bc87f23cc43cd580fa149e68271e65fdf2c29ddb0a15cd78d6f0de1a50332fdc026ea1b7d0ec7b8 vsb-hammer.patch
c62365110dd0a550e55f1445b197f1f968849b1079439cda0d44778772964779b4ab1142ccc662ba75ebb040e09ef4b4bfc253f4632db24ed783155be2f5f3b1 BTS-170.patch
ab7d0c1fa74862bf9364d5e2228200054a2c5c4351c979dc7a9850f630d74034edffba740b468e009c5419a3cec110322364303f8af28dcdbfbe672c3c16f450 BTS-196.patch
95f2063ecb902148e53603211452ca21d4dec215c32a07c2eebc5881dbdc7cba34a7a49177fedf4db1d7d8542708af673a31930fd7d49a6a2eb00b47dbe6eeb9 fix-deprecated-egrep-usage.patch"
|