From a84fb57e323c2665dd6f162768a4f47b99137b96 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sat, 25 Jan 2025 18:36:56 +0200 Subject: [PATCH] ports: Add binutils port --- ports/binutils/build.sh | 24 ++++++++++++++++++++++ ports/binutils/patches/binutils-2.39.patch | 1 + 2 files changed, 25 insertions(+) create mode 100755 ports/binutils/build.sh create mode 120000 ports/binutils/patches/binutils-2.39.patch diff --git a/ports/binutils/build.sh b/ports/binutils/build.sh new file mode 100755 index 00000000..5e818d66 --- /dev/null +++ b/ports/binutils/build.sh @@ -0,0 +1,24 @@ +#!/bin/bash ../install.sh + +NAME='binutils' +VERSION='2.39' +DOWNLOAD_URL="https://ftp.gnu.org/gnu/binutils/binutils-$VERSION.tar.gz#d12ea6f239f1ffe3533ea11ad6e224ffcb89eb5d01bbea589e9158780fa11f10" +DEPENDENCIES=('zlib') +CONFIGURE_OPTIONS=( + "--target=$BANAN_TOOLCHAIN_TRIPLE" + '--with-sysroot=/' + "--with-build-sysroot=$BANAN_SYSROOT" + '--enable-initfini-array' + '--enable-shared' + '--enable-lto' + '--disable-nls' + '--disable-werror' +) + +build() { + # This file is not even used. binutils just requires it to exist + touch "$BANAN_SYSROOT/usr/include/memory.h" + + make -j$(nproc) || exit 1 + find . -type f -executable -exec strip --strip-unneeded {} + 2>/dev/null +} diff --git a/ports/binutils/patches/binutils-2.39.patch b/ports/binutils/patches/binutils-2.39.patch new file mode 120000 index 00000000..cc6bdebb --- /dev/null +++ b/ports/binutils/patches/binutils-2.39.patch @@ -0,0 +1 @@ +../../../toolchain/binutils-2.39.patch \ No newline at end of file