milis/talimatname/temel/gcc/talimat

102 lines
2.5 KiB
Plaintext
Raw Normal View History

2017-10-27 21:56:50 +02:00
# Tanım: GNU compiler collection, which includes the C, C++, fortran and objc compilers.
2016-02-24 01:27:23 +01:00
# URL: http://gcc.gnu.org
2017-10-27 21:56:50 +02:00
# Paketçi: milisarge@gmail.com
# Gerekler:
2017-10-28 14:15:02 +02:00
isim=gcc
surum=5.3.0
devir=1
2016-02-24 01:27:23 +01:00
2017-10-28 14:15:02 +02:00
kaynak=(http://ftp.gnu.org/gnu/gcc/gcc-$surum/gcc-$surum.tar.bz2)
2016-02-24 01:27:23 +01:00
2017-10-27 23:59:41 +02:00
derle()
2016-02-24 01:27:23 +01:00
{
2017-10-28 14:15:02 +02:00
cd gcc-$surum
2016-02-24 01:27:23 +01:00
mkdir -v ../gcc-build
cd ../gcc-build
SED=sed \
2017-10-28 14:15:02 +02:00
../gcc-$surum/configure --prefix=/usr \
2016-02-24 01:27:23 +01:00
--enable-languages=c,c++,objc,fortran \
--disable-multilib --disable-bootstrap --with-system-zlib
make
make DESTDIR=$PKG install
mkdir $PKG/lib
ln -sv ../usr/bin/cpp $PKG/lib/cpp
ln -sv gcc $PKG/usr/bin/cc
install -dm755 $PKG/usr/share/gdb/auto-load/usr/lib
install -dm755 $PKG/usr/lib/bfd-plugins
cd $PKG/usr/lib/bfd-plugins
case `uname -m` in
i?86) sed -i "s|-L$SRC[^ ]* ||g" \
$PKG/usr/lib/{libstdc++.la,libsupc++.la}
mv -v $PKG/usr/lib/*gdb.py \
$PKG/usr/share/gdb/auto-load/usr/lib
2017-10-28 14:15:02 +02:00
ln -sfv ../../libexec/gcc/i686-pc-linux-gnu/$surum/liblto_plugin.so;;
2016-02-24 01:27:23 +01:00
x86_64)
sed -i "s|-L$SRC[^ ]* ||g" \
$PKG/usr/lib64/{libstdc++.la,libsupc++.la}
mv -v $PKG/usr/lib64/*gdb.py \
$PKG/usr/share/gdb/auto-load/usr/lib
2017-10-28 14:15:02 +02:00
ln -sfv ../../libexec/gcc/x86_64-unknown-linux-gnu/$surum/liblto_plugin.so;;
2016-02-24 01:27:23 +01:00
esac
rm -rf $PKG/usr/share/info/dir
# Move the needed runtime libraries
case `uname -m` in
i?86) mkdir -pv $PKG/usr/lib
mv -v $PKG/usr/lib/libgfortran.{a,la} \
$PKG/lib/
ln -sv ../../lib/libgfortran.{la,a} $PKG/usr/lib
mv -v $PKG/usr/lib/libgfortran.so{,.3,.3.0.0} \
$PKG/lib/
ln -svf ../../lib/libgfortran.so{,.3,.3.0.0} $PKG/usr/lib
mv -v $PKG/usr/lib/libgcc_s.so{,.1} \
$PKG/lib
ln -sv ../../lib/libgcc_s.so{,.1} $PKG/usr/lib
mv -v $PKG/usr/lib/libstdc++.* \
$PKG/lib/
mv -v $PKG/usr/lib/libsupc++.{la,a} \
$PKG/lib
ln -sv ../../lib/libstdc++.so{,.6,.6.0.30} \
$PKG/usr/lib
ln -sv ../../lib/libstdc++.{a,la} \
$PKG/usr/lib
ln -sv ../../lib/libsupc++.{la,a} \
$PKG/usr/lib;;
x86_64) mkdir -pv $PKG/usr/lib64
mv -v $PKG/usr/lib64/libgfortran.{a,la} \
$PKG/lib
ln -sv ../../lib/libgfortran.{la,a} $PKG/usr/lib64
mv -v $PKG/usr/lib64/libgfortran.so{,.3,.3.0.0} \
$PKG/lib
ln -sv ../../lib/libgfortran.so{,.3,.3.0.0} $PKG/usr/lib64
mv -v $PKG/usr/lib64/libgcc_s.so{,.1} \
$PKG/lib
ln -sv ../../lib/libgcc_s.so{,.1} $PKG/usr/lib64
mv -v $PKG/usr/lib64/libstdc++.* \
$PKG/lib
mv -v $PKG/usr/lib64/libsupc++.{la,a} \
$PKG/lib
ln -sv ../../lib/libstdc++.so{,.6,.6.0.30} \
$PKG/usr/lib64
ln -sv ../../lib/libstdc++.{a,la} \
$PKG/usr/lib64
ln -sv ../../lib/libsupc++.{la,a} \
$PKG/usr/lib64;;
esac
}