2006-02-23 15:26:10 +00:00
|
|
|
# Description: The GNU Compiler Collection
|
|
|
|
# URL: http://gcc.gnu.org
|
2007-01-23 17:35:30 +00:00
|
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
2010-06-03 10:09:22 +00:00
|
|
|
# Depends on: zlib libmpc
|
2006-02-23 15:26:10 +00:00
|
|
|
|
|
|
|
name=gcc
|
2012-09-05 19:22:18 +02:00
|
|
|
version=4.7-20120901
|
2009-07-22 16:39:41 +02:00
|
|
|
release=1
|
2012-08-08 17:55:49 +02:00
|
|
|
source=(ftp://gcc.gnu.org/pub/gcc/snapshots/$version/$name-$version.tar.bz2
|
2010-06-03 10:09:22 +00:00
|
|
|
$name-nocheck-fixincludes.patch)
|
2008-09-17 10:43:39 +02:00
|
|
|
|
|
|
|
|
2006-02-23 15:26:10 +00:00
|
|
|
build() {
|
2009-05-09 12:55:48 +02:00
|
|
|
patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch
|
2006-11-20 12:08:00 +00:00
|
|
|
|
2006-02-23 15:26:10 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
../$name-$version/configure --prefix=/usr \
|
2010-06-03 10:09:22 +00:00
|
|
|
--mandir=/usr/man \
|
2008-09-17 10:43:39 +02:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--enable-languages=c,c++,objc \
|
|
|
|
--enable-threads=posix \
|
|
|
|
--enable-__cxa_atexit \
|
|
|
|
--enable-clocale=gnu \
|
|
|
|
--enable-shared \
|
|
|
|
--disable-nls \
|
2010-06-03 10:09:22 +00:00
|
|
|
--with-x=no \
|
|
|
|
--with-system-zlib \
|
2012-08-08 17:55:49 +02:00
|
|
|
--with-pkgversion="CRUX-i686"
|
2006-02-23 15:26:10 +00:00
|
|
|
make bootstrap
|
2007-09-10 08:36:05 +02:00
|
|
|
make -j1 DESTDIR=$PKG install
|
2008-09-17 10:43:39 +02:00
|
|
|
|
2006-02-23 15:26:10 +00:00
|
|
|
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++
|
2010-12-23 20:05:51 +01:00
|
|
|
|
2012-08-08 17:55:49 +02:00
|
|
|
mv $PKG/usr/lib/gcc/*/4.7.2/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/4.7.2/include/
|
2010-12-23 20:05:51 +01:00
|
|
|
|
2012-08-08 17:55:49 +02:00
|
|
|
rm -f $PKG/usr/lib/{libiberty.a,libstdc++.so.6.0.17-gdb.py}
|
2010-06-03 10:09:22 +00:00
|
|
|
rm -r $PKG/usr/share
|
|
|
|
rm -r $PKG/usr/bin/*-linux-gnu-*
|
2012-08-08 17:55:49 +02:00
|
|
|
rm -r $PKG/usr/lib/gcc/*/4.7.2/{install-tools,include-fixed}
|
2008-09-17 10:43:39 +02:00
|
|
|
|
2006-02-23 15:26:10 +00:00
|
|
|
sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la}
|
|
|
|
}
|