2017-05-26 20:26:25 +00:00
|
|
|
# Automatically generated aport, do not edit!
|
|
|
|
# Generator: pmbootstrap aportgen binutils-armhf
|
|
|
|
# Based on: main/binutils
|
|
|
|
|
2022-08-24 06:31:17 +00:00
|
|
|
|
|
|
|
CTARGET_ARCH=armhf
|
|
|
|
CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
|
|
|
|
|
2020-05-24 01:59:09 +00:00
|
|
|
pkgname=binutils-armhf
|
2023-01-15 20:16:02 +00:00
|
|
|
pkgver=2.40
|
2023-04-14 06:14:09 +00:00
|
|
|
pkgrel=5
|
2017-05-26 20:26:25 +00:00
|
|
|
pkgdesc="Tools necessary to build programs for armhf targets"
|
2017-11-27 20:40:38 +00:00
|
|
|
url="https://www.gnu.org/software/binutils/"
|
2022-08-24 06:31:17 +00:00
|
|
|
makedepends_build="bison flex texinfo"
|
2023-01-15 20:16:02 +00:00
|
|
|
makedepends_host="zlib-dev zstd-dev"
|
2022-08-24 06:31:17 +00:00
|
|
|
makedepends="$makedepends_build $makedepends_host"
|
2020-07-29 10:46:19 +00:00
|
|
|
arch="x86_64"
|
2023-01-15 20:16:02 +00:00
|
|
|
license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause"
|
2022-08-24 06:31:17 +00:00
|
|
|
subpackages="binutils-dev binutils-doc"
|
2023-03-04 07:51:13 +00:00
|
|
|
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
|
2017-05-26 20:26:25 +00:00
|
|
|
binutils-ld-fix-static-linking.patch
|
2020-10-31 01:45:20 +00:00
|
|
|
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
2017-05-26 20:26:25 +00:00
|
|
|
"
|
2020-07-29 10:46:19 +00:00
|
|
|
builddir="$srcdir/binutils-$pkgver"
|
2017-05-26 20:26:25 +00:00
|
|
|
|
2021-04-25 13:31:54 +00:00
|
|
|
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
2022-08-24 06:31:17 +00:00
|
|
|
subpackages="$subpackages binutils-gold"
|
2021-04-25 13:31:54 +00:00
|
|
|
fi
|
|
|
|
|
2017-05-26 20:26:25 +00:00
|
|
|
if [ "$CHOST" != "$CTARGET" ]; then
|
|
|
|
pkgname="binutils-$CTARGET_ARCH"
|
|
|
|
subpackages=""
|
|
|
|
sonameprefix="binutils:"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# secfixes:
|
2022-09-18 19:01:58 +00:00
|
|
|
# 2.39-r2:
|
|
|
|
# - CVE-2022-38533
|
|
|
|
# 2.39-r0:
|
|
|
|
# - CVE-2022-38126
|
2021-04-25 13:31:54 +00:00
|
|
|
# 2.35.2-r1:
|
|
|
|
# - CVE-2021-3487
|
2019-09-11 18:37:45 +00:00
|
|
|
# 2.32-r0:
|
2020-05-24 01:59:09 +00:00
|
|
|
# - CVE-2018-19931
|
|
|
|
# - CVE-2018-19932
|
|
|
|
# - CVE-2018-20002
|
|
|
|
# - CVE-2018-20712
|
2017-05-26 20:26:25 +00:00
|
|
|
# 2.28-r1:
|
2020-05-24 01:59:09 +00:00
|
|
|
# - CVE-2017-7614
|
2017-05-26 20:26:25 +00:00
|
|
|
|
|
|
|
build() {
|
2022-08-24 06:31:17 +00:00
|
|
|
local _sysroot=/
|
|
|
|
local _cross_configure="--enable-install-libiberty --enable-shared"
|
|
|
|
local _arch_configure=""
|
|
|
|
local _gold_configure="--disable-gold"
|
|
|
|
local _plugin_configure="--enable-plugins"
|
|
|
|
|
|
|
|
if [ "$CHOST" != "$CTARGET" ]; then
|
|
|
|
_sysroot="$CBUILDROOT"
|
|
|
|
_cross_configure="--disable-install-libiberty"
|
|
|
|
_plugin_configure="--disable-plugins"
|
|
|
|
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
|
|
|
|
|
|
|
|
./configure \
|
|
|
|
--build=$CBUILD \
|
|
|
|
--host=$CHOST \
|
|
|
|
--target=$CTARGET \
|
|
|
|
--with-build-sysroot="$CBUILDROOT" \
|
|
|
|
--with-sysroot=$_sysroot \
|
2018-12-31 07:53:12 +00:00
|
|
|
--prefix=/usr \
|
2022-08-24 06:31:17 +00:00
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--infodir=/usr/share/info \
|
|
|
|
--disable-multilib \
|
|
|
|
--disable-gprofng \
|
2018-12-31 07:53:12 +00:00
|
|
|
--enable-ld=default \
|
2022-08-24 06:31:17 +00:00
|
|
|
$_gold_configure \
|
|
|
|
--enable-64-bit-bfd \
|
|
|
|
$_plugin_configure \
|
|
|
|
--enable-relro \
|
2018-12-31 07:53:12 +00:00
|
|
|
--enable-deterministic-archives \
|
2022-08-24 06:31:17 +00:00
|
|
|
--enable-default-execstack=no \
|
|
|
|
$_cross_configure \
|
|
|
|
$_arch_configure \
|
2023-01-15 20:16:02 +00:00
|
|
|
--enable-default-hash-style=gnu \
|
2022-08-24 06:31:17 +00:00
|
|
|
--with-pic \
|
2018-12-31 07:53:12 +00:00
|
|
|
--disable-werror \
|
2022-08-24 06:31:17 +00:00
|
|
|
--disable-nls \
|
|
|
|
--with-mmap \
|
|
|
|
--with-system-zlib
|
2018-12-31 07:53:12 +00:00
|
|
|
make
|
2017-05-26 20:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2018-12-31 07:53:12 +00:00
|
|
|
make install DESTDIR="$pkgdir"
|
2022-08-24 06:31:17 +00:00
|
|
|
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
|
|
|
|
rm -r "${pkgdir:?}"/usr/lib/bfd-plugins
|
|
|
|
fi
|
|
|
|
}
|
2017-05-26 20:26:25 +00:00
|
|
|
|
2022-08-24 06:31:17 +00:00
|
|
|
gold() {
|
|
|
|
pkgdesc="GNU binutils - gold linker"
|
2017-05-26 20:26:25 +00:00
|
|
|
|
2022-08-24 06:31:17 +00:00
|
|
|
if [ -e "$pkgdir"/usr/bin/ld.gold ]; then
|
2023-03-04 07:51:13 +00:00
|
|
|
amove usr/bin/ld.gold
|
2022-08-24 06:31:17 +00:00
|
|
|
fi
|
2023-03-04 07:51:13 +00:00
|
|
|
amove usr/$CTARGET/bin/ld.gold
|
2022-08-24 06:31:17 +00:00
|
|
|
}
|
2017-05-26 20:26:25 +00:00
|
|
|
|
2021-05-19 20:16:41 +00:00
|
|
|
sha512sums="
|
2023-03-04 07:51:13 +00:00
|
|
|
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
|
2017-05-26 20:26:25 +00:00
|
|
|
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
2021-09-27 14:41:54 +00:00
|
|
|
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
2021-05-19 20:16:41 +00:00
|
|
|
"
|