talimat.eski 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Description: Low Level Virtual Machine, collection of modular and reusable compiler and toolchain.
  2. # URL: http://llvm.org/
  3. # Maintainers: Chris Lattner <sabre at nondot dot org>
  4. # Packager: pierre at nutyx dot org, tnut at nutyx dot org
  5. # Depends on: python
  6. name=llvm
  7. version=3.7.1
  8. release=1
  9. source=(http://llvm.org/releases/$version/$name-$version.src.tar.xz
  10. http://llvm.org/releases/$version/cfe-$version.src.tar.xz
  11. http://llvm.org/releases/$version/compiler-rt-$version.src.tar.xz)
  12. build() {
  13. cd $name-$version.src
  14. mv ../compiler-rt-${version}.src projects/compiler-rt
  15. mv ../cfe-$version.src tools/clang
  16. sed -r "/ifeq.*CompilerTargetArch/s#i386#i686#g" \
  17. -i projects/compiler-rt/make/platform/clang_linux.mk
  18. case `uname -m` in
  19. x86_64)
  20. enable_pic="yes";;
  21. i?86)
  22. enable_pic="no";;
  23. esac
  24. sed -e 's:/docs/llvm:/share/doc/llvm-$version:' \
  25. -i Makefile.config.in
  26. mkdir -v build
  27. cd build
  28. CC=gcc CXX=g++ \
  29. ../configure --prefix=/usr \
  30. --datarootdir=/usr/share \
  31. --sysconfdir=/etc \
  32. --enable-libffi \
  33. --enable-optimized \
  34. --enable-shared \
  35. --enable-targets=host,r600 \
  36. --disable-assertions \
  37. --docdir=/usr/share/doc/$name-$version
  38. make || make -j1
  39. make DESTDIR=$PKG install || make -j1 DESTDIR=$PKG install
  40. for file in '$PKG/usr/lib/lib{clang,LLVM,LTO}*.a'
  41. do
  42. test -f $file && chmod -v 644 $file
  43. done
  44. install -v -dm755 $PKG/usr/lib/clang-analyzer
  45. for prog in scan-build scan-view
  46. do
  47. cp -rfv ../tools/clang/tools/$prog $PKG/usr/lib/clang-analyzer/
  48. ln -sfv ../lib/clang-analyzer/$prog/$prog $PKG/usr/bin/
  49. done
  50. install -d $PKG/etc/ld.so.conf.d
  51. echo /usr/lib/llvm > $PKG/etc/ld.so.conf.d/llvm.conf
  52. ln -sfv /usr/bin/clang $PKG/usr/lib/clang-analyzer/scan-build/
  53. mkdir -p $PKG/usr/share/man/man1
  54. mv -v $PKG/usr/lib/clang-analyzer/scan-build/scan-build.1 $PKG/usr/share/man/man1/
  55. }