143 lines
4.3 KiB
Plaintext
143 lines
4.3 KiB
Plaintext
# Automatically generated aport, do not edit!
|
|
# Generator: pmbootstrap aportgen binutils-armhf
|
|
# Based on: main/binutils
|
|
|
|
|
|
CTARGET_ARCH=armhf
|
|
CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
|
|
|
|
pkgname=binutils-armhf
|
|
pkgver=2.35.2
|
|
pkgrel=1
|
|
pkgdesc="Tools necessary to build programs for armhf targets"
|
|
url="https://www.gnu.org/software/binutils/"
|
|
makedepends_build="bison flex texinfo"
|
|
makedepends_host="zlib-dev"
|
|
makedepends="$makedepends_build $makedepends_host"
|
|
arch="x86_64"
|
|
license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
|
|
subpackages="binutils-dev binutils-doc"
|
|
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
|
|
binutils-ld-fix-static-linking.patch
|
|
gold-mips.patch
|
|
ld-bfd-mips.patch
|
|
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
|
CVE-2021-3487.patch
|
|
"
|
|
builddir="$srcdir/binutils-$pkgver"
|
|
|
|
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
|
subpackages="$subpackages binutils-gold"
|
|
fi
|
|
|
|
if [ "$CHOST" != "$CTARGET" ]; then
|
|
pkgname="binutils-$CTARGET_ARCH"
|
|
subpackages=""
|
|
sonameprefix="binutils:"
|
|
fi
|
|
|
|
# secfixes:
|
|
# 2.35.2-r1:
|
|
# - CVE-2021-3487
|
|
# 2.32-r0:
|
|
# - CVE-2018-19931
|
|
# - CVE-2018-19932
|
|
# - CVE-2018-20002
|
|
# - CVE-2018-20712
|
|
# 2.28-r1:
|
|
# - CVE-2017-7614
|
|
|
|
build() {
|
|
local _sysroot=/
|
|
local _cross_configure="--enable-install-libiberty --enable-shared"
|
|
local _arch_configure=""
|
|
local _gold_configure="--disable-gold"
|
|
|
|
if [ "$CHOST" != "$CTARGET" ]; then
|
|
_sysroot="$CBUILDROOT"
|
|
_cross_configure="--disable-install-libiberty"
|
|
fi
|
|
|
|
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
|
_gold_configure="--enable-gold"
|
|
fi
|
|
|
|
if [ "$CTARGET_ARCH" = "x86_64" ]; then
|
|
_arch_configure="--enable-targets=x86_64-pep"
|
|
fi
|
|
|
|
if [ "$CTARGET_ARCH" = "riscv64" ]; then
|
|
_gold_configure="--disable-gold"
|
|
fi
|
|
|
|
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-ld=default \
|
|
$_gold_configure \
|
|
--enable-64-bit-bfd \
|
|
--enable-plugins \
|
|
--enable-relro \
|
|
--enable-deterministic-archives \
|
|
$_cross_configure \
|
|
$_arch_configure \
|
|
$_hash_style_configure \
|
|
--with-pic \
|
|
--disable-werror \
|
|
--disable-nls \
|
|
--with-mmap \
|
|
--with-system-zlib
|
|
make
|
|
}
|
|
|
|
package() {
|
|
make install DESTDIR="$pkgdir"
|
|
if [ -d "$pkgdir"/usr/lib64 ]; then
|
|
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 - libbfd and libopcodes"
|
|
|
|
mkdir -p "$subpkgdir"/usr/lib
|
|
mv "$pkgdir"/usr/lib/lib*.so "$subpkgdir"/usr/lib/
|
|
}
|
|
|
|
gold() {
|
|
pkgdesc="GNU binutils - gold linker"
|
|
|
|
if [ -e "$pkgdir"/usr/bin/ld.gold ]; then
|
|
mkdir -p "$subpkgdir"/usr/bin
|
|
mv "$pkgdir"/usr/bin/ld.gold "$subpkgdir"/usr/bin
|
|
fi
|
|
mkdir -p "$subpkgdir"/usr/$CTARGET/bin
|
|
mv "$pkgdir"/usr/$CTARGET/bin/ld.gold "$subpkgdir"/usr/$CTARGET/bin/ld.gold
|
|
}
|
|
|
|
sha512sums="9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348 binutils-2.35.2.tar.xz
|
|
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
|
f55cf2e0bf82f97583a1abe10710e4013ecf7d64f1da2ef8659a44a06d0dd8beaf58dab98a183488ea137f03e32d62efc878d95f018f836f8cec870bc448556f gold-mips.patch
|
|
314d2ef9071c89940aa6c8118e8a1e2f191a5d0a4bf596da1ad9cc84f884d8bc7dea8bd7b9fc3f8f1bddd3fd41c6eb017e1e804044b3bf084df1ed9e6e095e2d ld-bfd-mips.patch
|
|
642c617db6c6e491f78f053d60f3aa369bad7bf8c1bc7ce267de6cf8fddf6c0d4cf63ce8c8f6e2f225dedbce7cb930d8e87e168fd8f72ca0837c77266ee2b5f8 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
|
b08384ed124a74ad3a424db370c107230f09a54378502ca4385deb738f7cf799857f2af0db52709c7eeab8fa6c0a3d972f891396cce1e2834a21f67682fc4355 CVE-2021-3487.patch"
|