git » binutils.git » commit 1f6017c

binutils 2.42

author Urja (ARMLFS builder)
2024-07-12 17:38:19 UTC
committer Urja (ARMLFS builder)
2024-07-12 17:38:19 UTC
parent ca7d6ede55ab7555710b1b8c405639cb3cb9b7d2

binutils 2.42

PKGBUILD +37 -35

diff --git a/PKGBUILD b/PKGBUILD
index 28332bd..cb5aaf7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 pkgname=binutils
 pkgver=2.42
-pkgrel=1
-arch=('armv7h')
+pkgrel=2
+arch=('armv7h' 'aarch64')
 license=('unknown')
 source=("$pkgname-$pkgver.tar.xz")
 pkgdesc='A set of programs to assemble and manipulate binary and object files'
@@ -29,42 +29,44 @@ prepare() {
 }
 
 build() {
-  cd binutils-build
+  local _confflags=(
+    --prefix=/usr
+    --sysconfdir="${pkgdir}"/etc
+    --with-lib-path=/usr/lib:/usr/local/lib
+    --with-bugurl=https://armlfs.urja.dev
+    --enable-colored-disassembly
+    --enable-default-execstack=no
+    --enable-deterministic-archives
+    --enable-gold
+    --enable-install-libiberty
+    --enable-ld=default
+    --enable-new-dtags
+    --enable-plugins
+    --enable-relro
+    --enable-shared
+    --enable-threads
+    --disable-werror
+    --disable-gdb
+    --disable-gdbserver
+    --disable-libdecnumber
+    --disable-readline
+    --disable-sim
+    --disable-werror
+    --enable-64-bit-bfd
+    --with-debuginfod
+    --with-pic
+    --with-system-zlib
+    --enable-default-hash-style=gnu
+   )
 
-  # ALARM: Specify build host types
-  [[ $CARCH == "armv7h" ]] && 
-  [[ $CARCH == "aarch64" ]] && CONFIGFLAG="--host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu"
+  # Specify build host types
+  [[ $CARCH == "armv7h" ]] && _confflags+=(--host=armv7l-unknown-linux-gnueabihf --build=armv7l-unknown-linux-gnueabihf)
+  [[ $CARCH == "aarch64" ]] && _confflags+=(--host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu)
+
+  cd binutils-build
 
   "${srcdir}"/binutils/configure \
-    --prefix=/usr \
-    --sysconfdir="${pkgdir}"/etc \
-    --with-lib-path=/usr/lib:/usr/local/lib \
-    --with-bugurl=https://social.treehouse.systems/@urja \
-    --enable-colored-disassembly \
-    --enable-default-execstack=no \
-    --enable-deterministic-archives \
-    --enable-gold \
-    --enable-install-libiberty \
-    --enable-ld=default \
-    --enable-new-dtags \
-    --enable-plugins \
-    --enable-relro \
-    --enable-shared \
-    --enable-threads \
-    --disable-werror \
-    --disable-gdb \
-    --disable-gdbserver \
-    --disable-libdecnumber \
-    --disable-readline \
-    --disable-sim \
-    --disable-werror \
-    --enable-64-bit-bfd \
-    --with-debuginfod \
-    --with-pic \
-    --with-system-zlib \
-    --host=armv7l-unknown-linux-gnueabihf \
-    --build=armv7l-unknown-linux-gnueabihf \
-    --enable-default-hash-style=gnu
+      "${_confflags[@]:?_confflags unset}"
 
   make -O tooldir=/usr