Felix Singer has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/69695 )
Change subject: util/musl-xgcc: Add PKGBUILDs ......................................................................
util/musl-xgcc: Add PKGBUILDs
WIP
Signed-off-by: Felix Singer felixsinger@posteo.net Change-Id: I9082255c66c6e3024fac1b4f46b2abf0ce51476c --- A util/musl-xgcc/binutils/PKGBUILD 1 file changed, 69 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/95/69695/1
diff --git a/util/musl-xgcc/binutils/PKGBUILD b/util/musl-xgcc/binutils/PKGBUILD new file mode 100644 index 0000000..978427b --- /dev/null +++ b/util/musl-xgcc/binutils/PKGBUILD @@ -0,0 +1,57 @@ +_target=aarch64-linux-musl +pkgname=$_target-binutils +pkgver=2.39 +pkgrel=1 +pkgdesc='A set of programs to assemble and manipulate binary and object files for the ARM64 target' +arch=(x86_64) +url='https://www.gnu.org/software/binutils/' +license=(GPL) +depends=(zlib libelf) +source=(https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2%7B,.sig%7D) +sha1sums=('d9028547385694d61d98fb4e2882a2b9c40ce7e9' + 'SKIP') +sha256sums=('da24a84fef220102dd24042df06fdea851c2614a5377f86effa28f33b7b16148' + 'SKIP') +validpgpkeys=('3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F') # Nick Clifton (Chief Binutils Maintainer) nickc@redhat.com + +prepare() { + cd binutils-$pkgver + sed -i "/ac_cpp=/s/$CPPFLAGS/$CPPFLAGS -O2/" libiberty/configure +} + +build() { + cd binutils-$pkgver + + ./configure --target=$_target \ + --with-sysroot=/usr/$_target \ + --prefix=/usr \ + --disable-multilib \ + --disable-nls \ + --enable-deterministic-archives + + make +} + +check() { + cd binutils-$pkgver + + # unset LDFLAGS as testsuite makes assumptions about which ones are active + # do not abort on errors - manually check log files + make -k LDFLAGS="" check || true +} + +package() { + cd binutils-$pkgver + + make DESTDIR="$pkgdir" install + + # Remove file conflicting with host binutils and manpages for MS Windows tools + rm "$pkgdir"/usr/share/man/man1/$_target-{dlltool,windres,windmc}* + rm "$pkgdir"/usr/lib/bfd-plugins/libdep.so + rm "$pkgdir"/usr/etc/gprofng.rc + rm -r "$pkgdir"/usr/include + rm -r "$pkgdir"/usr/lib/gprofng/ + + # Remove info documents that conflict with host version + rm -r "$pkgdir"/usr/share/info +}