PKGBUILD 2.0 KB

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