PKGBUILD 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. _target=powerpc64le-linux-gnu
  3. pkgname=$_target-binutils
  4. pkgver=2.34
  5. pkgrel=1
  6. pkgdesc='A set of programs to assemble and manipulate binary and object files for the powerpc64le 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=('f47e7304e102c7bbc97958a08093e27796b9051d1567ce4fbb723d39ef3e29efa325ee14a1bdcc462a925a7f9bbbc9aee28294c6dc23850f371030f3835a8067'
  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. # Remove info documents that conflict with host version
  51. rm -r "$pkgdir"/usr/share/info
  52. }