2006-02-23 16:26:10 +01:00
|
|
|
# Description: The GNU Compiler Collection
|
2021-04-09 15:00:32 +02:00
|
|
|
# URL: http://gcc.gnu.org
|
|
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
|
|
|
# Depends on: zlib libmpc zstd
|
2006-02-23 16:26:10 +01:00
|
|
|
|
|
|
|
name=gcc
|
2022-07-09 15:13:45 +02:00
|
|
|
version=10.4.0
|
2018-01-25 17:41:07 +01:00
|
|
|
release=1
|
2020-03-12 22:22:09 +01: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() {
|
2021-04-09 15:00:32 +02:00
|
|
|
patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch
|
|
|
|
patch -d $name-$version -p1 -i $SRC/$name-4.7.3-multilib-dirs.patch
|
|
|
|
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
../$name-$version/configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--enable-languages=c,c++,objc \
|
|
|
|
--enable-threads=posix \
|
|
|
|
--enable-__cxa_atexit \
|
|
|
|
--enable-clocale=gnu \
|
|
|
|
--enable-shared \
|
|
|
|
--disable-nls \
|
|
|
|
--with-x=no \
|
|
|
|
--with-system-zlib \
|
|
|
|
--enable-multilib \
|
|
|
|
--enable-default-pie \
|
|
|
|
--enable-default-ssp \
|
|
|
|
--with-pkgversion="CRUX-x86_64-multilib"
|
|
|
|
make bootstrap
|
|
|
|
make -j1 DESTDIR=$PKG install
|
|
|
|
|
|
|
|
install -d $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/
|
2022-07-09 15:13:45 +02:00
|
|
|
rm -r $PKG/usr/share/{info,$name-$version}
|
2021-04-09 15:00:32 +02:00
|
|
|
rm -r $PKG/usr/bin/*-linux-gnu-*
|
2022-07-09 15:13:45 +02:00
|
|
|
rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed}
|
2021-04-09 15:00:32 +02:00
|
|
|
|
|
|
|
for D in lib{,32}; do
|
|
|
|
install -d -m 0755 $PKG/usr/share/gdb/auto-load/usr/${D}
|
|
|
|
mv $PKG/usr/${D}/libstdc++.so.*-gdb.py $PKG/usr/share/gdb/auto-load/usr/${D}
|
|
|
|
done
|
|
|
|
|
|
|
|
sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib{,32}/{libstdc++.la,libsupc++.la}
|
2006-02-23 16:26:10 +01:00
|
|
|
}
|