PKGBUILD 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. _target=xtensa-elf
  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 Xtensa (bare-metal) 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. binutils-2.36_fixup.patch binutils-2.34_fixup.patch binutils.patch)
  13. sha512sums=('5c40cfe05b922492627db71990dd2ba6030fd2de4bdba3f53a3f274543ff161fb56e2f6bdac107e0ffdcfd095e499c54e1157ee1865723baefa67b5b4d3da201'
  14. 'SKIP'
  15. 'fa1e3e1b30d625eae4e59f1396079cc3fa4d77ec4f119ad20c52db1e1ff1819989ff16dc583d7c719caeb7c0ece48d76fe7c08a85b960c7bc924fe780ffa4ac2'
  16. '4e5bbba907eec565f5c3ea00fa5a19c146ec19b1f2db38c6581f80a524475ad9b066839ca671da05c6fab9af402f2bb76e01d227e7456b3ef48c6d685605c8d1'
  17. 'e10ed358794d7aa32ac25087afd804dc4c3028c4664d7608eb86147f041561d16209afa6501bc8a19e02386674011d567640175f6b8bf89275c243dc3b3a9980')
  18. validpgpkeys=('EAF1C276A747E9ED86210CBAC3126D3B4AE55E93' # Tristan Gingold <gingold@adacore.com>
  19. '3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F') # Nick Clifton (Chief Binutils Maintainer) <nickc@redhat.com>
  20. prepare() {
  21. cd binutils-$pkgver
  22. sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
  23. # https://github.com/qca/open-ath9k-htc-firmware/pull/168
  24. patch -Np1 -i ../binutils-2.36_fixup.patch
  25. # https://github.com/qca/open-ath9k-htc-firmware/tree/master/local/patches
  26. patch -Np1 -i ../binutils-2.34_fixup.patch
  27. patch -Np1 -i ../binutils.patch
  28. }
  29. build() {
  30. cd binutils-$pkgver
  31. if [ "${CARCH}" != "i686" ]; then
  32. # enabling gold linker at i686 makes the install fail
  33. enable_gold='--enable-gold'
  34. fi
  35. ./configure --target=$_target \
  36. --with-sysroot=/usr/$_target \
  37. --prefix=/usr \
  38. --disable-multilib \
  39. --with-gnu-as \
  40. --with-gnu-ld \
  41. --disable-nls \
  42. --enable-ld=default \
  43. $enable_gold \
  44. --enable-plugins \
  45. --enable-deterministic-archives
  46. make
  47. }
  48. check() {
  49. cd binutils-$pkgver
  50. # unset LDFLAGS as testsuite makes assumptions about which ones are active
  51. # do not abort on errors - manually check log files
  52. make LDFLAGS="" -k check || true
  53. }
  54. package() {
  55. cd binutils-$pkgver
  56. make DESTDIR="$pkgdir" install
  57. # Remove file conflicting with host binutils and manpages for MS Windows tools
  58. rm "$pkgdir"/usr/share/man/man1/$_target-{dlltool,windres,windmc}*
  59. rm "$pkgdir"/usr/lib/bfd-plugins/libdep.so
  60. # Remove info documents that conflict with host version
  61. rm -r "$pkgdir"/usr/share/info
  62. }