blob: 072e4ecfe6c25fabb2992662f92311681ee9b3f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Description: La collection de compilateurs C, C++, obc GNU
# URL: http://gcc.gnu.org
# Packager: thierryn1 at hispeed dot ch
# Maintainer: NuTyX core team
name=gcc
version=4.5.0
release=2
source=(ftp://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.bz2\
)
build() {
cd $name-$version
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
case `uname -m` in
i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' \
gcc/Makefile.in ;;
esac
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
sed -i 's/getline/get_line/' libiberty/testsuite/test-demangle.c
mkdir ../gcc-build
cd ../gcc-build
../$name-$version/configure --prefix=/usr \
--libexecdir=/usr/lib --enable-shared \
--enable-threads=posix --enable-__cxa_atexit \
--enable-clocale=gnu --enable-languages=c,c++,objc,fortran \
--infodir=/usr/share/info --mandir=/usr/share/man --with-x=no \
--disable-multilib --disable-bootstrap
make
make DESTDIR=$PKG install
mkdir $PKG/lib
ln -sf ../usr/bin/cpp $PKG/lib/cpp
ln -sf gcc $PKG/usr/bin/cc
ln -sf g++ $PKG/usr/bin/c++
mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
# Move the python files, tanks to bouleetbil
mv $PKG/usr/lib/libstdc++.so.6.0.14-gdb.py $PKG/usr/share/$name-$version/python/libstdcxx/
# Remove the dir file
if [ -f $PKG/usr/share/info/dir ]; then
rm $PKG/usr/share/info/dir
fi
case `uname -m` in
i?86) sed -i "s|-L$SRC[^ ]* ||g" \
$PKG/usr/lib/{libstdc++.la,libsupc++.la} ;;
x86_64)
sed -i "s|-L$SRC[^ ]* ||g" \
$PKG/usr/lib64/{libstdc++.la,libsupc++.la} ;;
esac
}
|