2006-02-23 16:26:10 +01:00
|
|
|
# Description: The GNU Compiler Collection
|
|
|
|
# URL: http://gcc.gnu.org
|
2007-01-23 18:35:30 +01:00
|
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
2010-06-03 12:09:22 +02:00
|
|
|
# Depends on: zlib libmpc
|
2006-02-23 16:26:10 +01:00
|
|
|
|
|
|
|
name=gcc
|
2017-07-04 19:22:03 +02:00
|
|
|
version=6.4.0
|
2015-12-16 00:54:53 +01:00
|
|
|
release=1
|
2017-07-04 19:22:03 +02:00
|
|
|
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-$version/$name-$version.tar.xz \
|
2013-11-17 20:58:08 +01:00
|
|
|
$name-nocheck-fixincludes.patch $name-4.7.3-multilib-dirs.patch)
|
2008-09-17 10:43:39 +02:00
|
|
|
|
|
|
|
|
2006-02-23 16:26:10 +01:00
|
|
|
build() {
|
2009-05-09 12:55:48 +02:00
|
|
|
patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch
|
2013-11-17 20:58:08 +01:00
|
|
|
patch -d $name-$version -p1 -i $SRC/$name-4.7.3-multilib-dirs.patch
|
2006-11-20 13:08:00 +01:00
|
|
|
|
2006-02-23 16:26:10 +01:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
../$name-$version/configure --prefix=/usr \
|
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 12:09:22 +02:00
|
|
|
--with-x=no \
|
|
|
|
--with-system-zlib \
|
2012-11-22 19:38:39 +01:00
|
|
|
--enable-multilib \
|
2015-06-20 22:40:23 +02:00
|
|
|
--with-pkgversion="CRUX-x86_64-multilib"
|
2006-02-23 16:26:10 +01:00
|
|
|
make bootstrap
|
2007-09-10 08:36:05 +02:00
|
|
|
make -j1 DESTDIR=$PKG install
|
2008-09-17 10:43:39 +02:00
|
|
|
|
2015-07-27 19:04:58 +02:00
|
|
|
install -d $PKG/lib
|
2006-02-23 16:26:10 +01:00
|
|
|
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
|
|
|
|
2015-06-22 22:13:15 +02:00
|
|
|
mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
|
2015-06-20 22:40:23 +02:00
|
|
|
rm -f $PKG/usr/lib{,32}/{libiberty.a,libstdc++.so.6.0.21-gdb.py}
|
2015-07-26 00:13:15 +02:00
|
|
|
rm -r $PKG/usr/share/{info,$name-$version}
|
2010-06-03 12:09:22 +02:00
|
|
|
rm -r $PKG/usr/bin/*-linux-gnu-*
|
2015-06-22 22:13:15 +02:00
|
|
|
rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed}
|
2008-09-17 10:43:39 +02:00
|
|
|
|
2012-11-22 19:38:39 +01:00
|
|
|
sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib{,32}/{libstdc++.la,libsupc++.la}
|
2006-02-23 16:26:10 +01:00
|
|
|
}
|