talimat 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Description: Linker, assembler, and other tools for handling object files.
  2. # URL: http://sources.redhat.com/binutils/
  3. # Maintainers: Tristan Gingold ( gingold at adacore dot com ),Alan Modra ( amodra at bigpond dot net dot au )
  4. # Packager: milisarge@gmail.com
  5. name=binutils
  6. version=2.26
  7. release=3
  8. source=(http://ftp.gnu.org/gnu/binutils/binutils-$version.tar.bz2
  9. http://www.linuxfromscratch.org/patches/lfs/development/binutils-$version-upstream_fix-1.patch
  10. http://www.linuxfromscratch.org/patches/lfs/development/binutils-$version-upstream_fix-2.patch)
  11. build()
  12. {
  13. cd binutils-$version
  14. patch -Np1 -i ../binutils-$version-upstream_fix-1.patch
  15. patch -Np1 -i ../binutils-$version-upstream_fix-2.patch
  16. mkdir -v build
  17. cd build
  18. ../configure \
  19. --prefix=/usr --includedir=/usr/include \
  20. --bindir=/bin --sbindir=/sbin \
  21. --datarootdir=/usr/share \
  22. --enable-shared --disable-werror
  23. make tooldir=/
  24. # make LDFLAGS="" -k check || true
  25. # make tooldir=/usr DESTDIR=$PKG install
  26. make tooldir=/usr DESTDIR=$PKG install
  27. rm -rf $PKG/usr/share/info/dir
  28. rm $PKG/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}.1
  29. mkdir $PKG/lib
  30. for lib in libopcodes libbfd
  31. do
  32. mv $PKG/usr/lib/$lib-$version.20160125.so \
  33. $PKG/lib/$lib-$version.so
  34. ln -s $lib-$version.so $PKG/lib/$lib
  35. ln -s ../../lib/$lib-$version.20160125.so \
  36. $PKG/usr/lib/$lib-$version.so
  37. ln -s ../../lib/$lib-$version.so \
  38. $PKG/usr/lib/$lib
  39. done
  40. }