core/gcc/Pkgfile

49 lines
1.8 KiB
Plaintext
Raw Normal View History

2006-02-23 16:26:10 +01:00
# Description: The GNU Compiler Collection
# URL: http://gcc.gnu.org
# 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
2014-12-20 19:37:42 +01:00
version=4.8.4
2009-07-22 16:39:41 +02:00
release=1
source=(ftp://gcc.gnu.org/pub/gcc/releases/$name-$version/$name-$version.tar.bz2 \
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 \
2010-06-03 12:09:22 +02: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 12:09:22 +02:00
--with-x=no \
--with-system-zlib \
--enable-multilib \
2014-02-15 23:53:20 +01:00
--with-pkgversion="CRUX"
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
2006-02-23 16:26:10 +01: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
mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
2010-12-23 20:05:51 +01:00
2014-05-23 17:55:08 +02:00
rm -f $PKG/usr/lib{,32}/{libiberty.a,libstdc++.so.6.0.19-gdb.py}
2010-06-03 12:09:22 +02:00
rm -r $PKG/usr/share
rm -r $PKG/usr/bin/*-linux-gnu-*
rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed}
2008-09-17 10:43:39 +02:00
sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib{,32}/{libstdc++.la,libsupc++.la}
2006-02-23 16:26:10 +01:00
}