Guest User

Untitled

a guest
Dec 23rd, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. VERSION="$(cat /usr/bashpkg/pkgversion | grep "gcc" | sed "s/\.tar\.gz//;s/\.tar\.bz2//;s/\.src//;s/\.tar\.xz//")"
  4. DESCRIPTION="GNU C fordító."
  5. HOMEPAGE="https://gcc.gnu.org"
  6.  
  7.  
  8. config() {
  9. SED=sed
  10. ./configure \
  11. --prefix=/usr \
  12. --enable-languages=c,c++ \
  13. --disable-multilib \
  14. --disable-bootstrap \
  15. --with-system-zlib
  16. }
  17.  
  18. build() {
  19. make
  20. porg -lp "$VERSION" make install
  21. ln -sv ../usr/bin/cpp /lib
  22. ln -sv gcc /usr/bin/cc
  23. install -v -dm755 /usr/lib/bfd-plugins
  24. echo 'main(){}' > dummy.c
  25. cc dummy.c -v -Wl,--verbose &> dummy.log
  26. readelf -l a.out | grep ': /lib'
  27. rm -v dummy.c a.out dummy.log
  28. mkdir -pv /usr/share/gdb/auto-load/usr/lib
  29. mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib
  30. }
  31.  
  32. config
  33. if [ $? -ne 0 ]; then
  34. exit 1
  35. fi
  36.  
  37. build
Advertisement
Add Comment
Please, Sign In to add comment