PKGBUILD 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. _target=arm-linux-gnueabi
  3. pkgname=$_target-binutils
  4. pkgver=2.39
  5. pkgrel=1
  6. pkgdesc='A set of programs to assemble and manipulate binary and object files for the ARM GNU EABI little-endian target'
  7. arch=(x86_64 i686 armv7h)
  8. url='https://www.gnu.org/software/binutils/'
  9. license=(GPL)
  10. depends=(zlib libelf)
  11. source=(https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2{,.sig})
  12. sha512sums=('faa592dd48fc715901ad704ac96dbd34b1792c51e77c7a92a387964b0700703c74be07de45cc4751945c8c0674368c73dc17bbc563d1d2cd235b5ebd8c6e7efb'
  13. 'SKIP')
  14. validpgpkeys=('3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F') # Nick Clifton (Chief Binutils Maintainer) <nickc@redhat.com>
  15. prepare() {
  16. cd binutils-$pkgver
  17. sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
  18. }
  19. build() {
  20. cd binutils-$pkgver
  21. if [ "${CARCH}" != "i686" ]; then
  22. # enabling gold linker at i686 makes the install fail
  23. enable_gold='--enable-gold'
  24. fi
  25. ./configure --target=$_target \
  26. --with-sysroot=/usr/$_target \
  27. --prefix=/usr \
  28. --disable-multilib \
  29. --with-gnu-as \
  30. --with-gnu-ld \
  31. --disable-nls \
  32. --enable-ld=default \
  33. $enable_gold \
  34. --enable-plugins \
  35. --enable-deterministic-archives
  36. make
  37. }
  38. check() {
  39. cd binutils-$pkgver
  40. # unset LDFLAGS as testsuite makes assumptions about which ones are active
  41. # do not abort on errors - manually check log files
  42. make LDFLAGS="" -k check || true
  43. }
  44. package() {
  45. cd binutils-$pkgver
  46. make DESTDIR="$pkgdir" install
  47. # Remove file conflicting with host binutils and manpages for MS Windows tools
  48. rm "$pkgdir"/usr/share/man/man1/$_target-{dlltool,windres,windmc}*
  49. rm "$pkgdir"/usr/lib/bfd-plugins/libdep.so
  50. # Remove info documents that conflict with host version
  51. rm -r "$pkgdir"/usr/share/info
  52. }