Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- VERSION="$(cat /usr/bashpkg/pkgversion | grep "gcc" | sed "s/\.tar\.gz//;s/\.tar\.bz2//;s/\.src//;s/\.tar\.xz//")"
- DESCRIPTION="GNU C fordító."
- HOMEPAGE="https://gcc.gnu.org"
- config() {
- SED=sed
- ./configure \
- --prefix=/usr \
- --enable-languages=c,c++ \
- --disable-multilib \
- --disable-bootstrap \
- --with-system-zlib
- }
- build() {
- make
- porg -lp "$VERSION" make install
- ln -sv ../usr/bin/cpp /lib
- ln -sv gcc /usr/bin/cc
- install -v -dm755 /usr/lib/bfd-plugins
- echo 'main(){}' > dummy.c
- cc dummy.c -v -Wl,--verbose &> dummy.log
- readelf -l a.out | grep ': /lib'
- rm -v dummy.c a.out dummy.log
- mkdir -pv /usr/share/gdb/auto-load/usr/lib
- mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib
- }
- config
- if [ $? -ne 0 ]; then
- exit 1
- fi
- build
Advertisement
Add Comment
Please, Sign In to add comment