core/gcc/Pkgfile

47 lines
1.7 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
2016-12-21 17:56:23 +01:00
version=6.3.0
2015-12-16 00:54:53 +01:00
release=1
2015-07-16 19:47:01 +02:00
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-$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 \
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 \
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
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
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-*
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
}