PKGBUILD 2.0 KB

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