diff options
Diffstat (limited to 'main/binutils/APKBUILD')
-rw-r--r-- | main/binutils/APKBUILD | 96 |
1 files changed, 52 insertions, 44 deletions
diff --git a/main/binutils/APKBUILD b/main/binutils/APKBUILD index 79c74bfe8bd..e0c32f5079d 100644 --- a/main/binutils/APKBUILD +++ b/main/binutils/APKBUILD @@ -1,26 +1,29 @@ +# Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=binutils -pkgver=2.35.2 -pkgrel=2 +pkgver=2.42 +pkgrel=0 pkgdesc="Tools necessary to build programs" url="https://www.gnu.org/software/binutils/" makedepends_build="bison flex texinfo" makedepends_host="zlib-dev" -makedepends="$makedepends_build $makedepends_host" arch="all" -license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD" +license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause" subpackages="$pkgname-dev $pkgname-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 - binutils-mips-disable-assert.patch + binutils-ld-fix-static-linking.patch + LoongArch-Modify-inconsistent-behavior-of-ld-with-un.patch " builddir="$srcdir/$pkgname-$pkgver" +options="!check" + +if [ -z "$BOOTSTRAP" ]; then + makedepends_host="$makedepends_host jansson-dev zstd-dev" + _noboot_configure="--enable-jansson --with-zstd" +fi -if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then +if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ] && [ "$CTARGET_ARCH" != "loongarch64" ]; then subpackages="$subpackages $pkgname-gold" fi @@ -31,6 +34,14 @@ if [ "$CHOST" != "$CTARGET" ]; then fi # secfixes: +# 2.40-r10: +# - CVE-2023-1972 +# 2.40-r0: +# - CVE-2023-1579 +# 2.39-r2: +# - CVE-2022-38533 +# 2.39-r0: +# - CVE-2022-38126 # 2.35.2-r1: # - CVE-2021-3487 # 2.32-r0: @@ -46,13 +57,15 @@ build() { 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 + if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ] && [ "$CTARGET_ARCH" != "loongarch64" ]; then _gold_configure="--enable-gold" fi @@ -60,15 +73,12 @@ build() { _arch_configure="--enable-targets=x86_64-pep" fi - if [ "$CTARGET_ARCH" = "riscv64" ]; then + if [ "$CTARGET_ARCH" = "riscv64" ] || [ "$CTARGET_ARCH" = "loongarch64" ]; 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 - + CFLAGS="$CFLAGS -O2" \ + CXXFLAGS="$CXXFLAGS -O2" \ ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -78,20 +88,29 @@ build() { --prefix=/usr \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ - --disable-multilib \ - --enable-ld=default \ + --sysconfdir=/etc \ + $_arch_configure \ + $_cross_configure \ $_gold_configure \ + $_plugin_configure \ + $_noboot_configure \ + --disable-gdb \ + --disable-gprofng \ + --disable-multilib \ + --disable-nls \ + --disable-werror \ --enable-64-bit-bfd \ - --enable-plugins \ - --enable-relro \ + --enable-colored-disassembly \ + --enable-default-execstack=no \ + --enable-default-hash-style=gnu \ --enable-deterministic-archives \ - $_cross_configure \ - $_arch_configure \ - $_hash_style_configure \ - --with-pic \ - --disable-werror \ - --disable-nls \ + --enable-ld=default \ + --enable-new-dtags \ + --enable-relro \ + --enable-threads \ + --with-bugurl="https://gitlab.alpinelinux.org/alpine/aports/-/issues" \ --with-mmap \ + --with-pic \ --with-system-zlib make } @@ -107,33 +126,22 @@ package() { # 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 } -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 + amove usr/bin/ld.gold fi - mkdir -p "$subpkgdir"/usr/$CTARGET/bin - mv "$pkgdir"/usr/$CTARGET/bin/ld.gold "$subpkgdir"/usr/$CTARGET/bin/ld.gold + amove usr/$CTARGET/bin/ld.gold } sha512sums=" -9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348 binutils-2.35.2.tar.xz +155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6 binutils-2.42.tar.xz +70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch 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 -609cd90d8b334eb309f586b17b9d335a08d3dbb6def7c3eb5c010028fcb681674031e5b9d853aa7a39a50304356a86afc184b85562b3f228f8197f4d29395c8f binutils-mips-disable-assert.patch +f901833707dbe38c6519df91f03c51886e7f11aabd0c2dbe869eb6ffedb38201c020a6d34b3fa8aaa7d195349a0dd934709ca41109047348a7f303d2a8bf4f75 LoongArch-Modify-inconsistent-behavior-of-ld-with-un.patch " |