2021-07-01 20:57:17 +03:00
|
|
|
#!/bin/sh
|
|
|
|
pkg_ver="todo"
|
|
|
|
|
|
|
|
pkg_install() {
|
2021-06-30 01:08:42 +03:00
|
|
|
git clone git://gcc.gnu.org/git/gcc.git
|
|
|
|
cd gcc
|
2021-07-01 20:57:17 +03:00
|
|
|
|
2021-07-01 02:59:46 +03:00
|
|
|
sed -i '/m64=/s/lib64/lib/' gcc/gcc/config/i386/t-linux64
|
|
|
|
sed -i 's/lib64/lib/' gcc/gcc/config/i386/linux64.h
|
2021-06-30 01:08:42 +03:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2021-07-01 22:26:42 +03:00
|
|
|
../configure --prefix=/usr --enable-languages=c,c++,d,fortran,go,objc,obj-c++
|
2021-07-01 20:57:17 +03:00
|
|
|
make
|
|
|
|
make install DESTDIR="$1"
|
2021-07-01 02:59:46 +03:00
|
|
|
ln -s gcc "$1/usr/bin/cc"
|
|
|
|
install -Dm755 ../c99 "$1/usr/bin/c99"
|
2021-07-01 20:57:17 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
pkg_uninstall() {
|
|
|
|
make uninstall
|
|
|
|
}
|