added libstdc++ bootstrap step

This commit is contained in:
ag-tsotetsi
2026-02-07 14:23:34 +02:00
parent a28b6375e5
commit 6dd72420df
2 changed files with 59 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
. $PROJECTDIR/build/gcc/package.env
fetch $GCC_URL
cd $SOURCES && tar xf gcc-$GCC_VERSION.tar.xz && cd gcc-$GCC_VERSION
bootstrap() {
mkdir -p build && cd build
../libstdc++-v3/configure \
--host=$TARGET \
--build=$(../config.guess) \
--prefix=/usr \
--disable-multilib \
--disable-nls \
--disable-libstdcxx-pch \
--with-gxx-include-dir=/cross/$TARGET/include/c++/$GCC_VERSION > /dev/null
make > /dev/null && make DESTDIR=$SYSROOT install > /dev/null
rm $SYSROOT/usr/lib/lib{stdc++{,exp,fs},supc++}.la
}
toolchain() {
echo toolchain
}
setup() {
echo setup
}
final() {
echo final
}
case $1 in
bootstrap)
bootstrap
;;
toolchain)
toolchain
;;
setup)
setup
;;
final)
final
;;
esac
cd $SOURCES && rm -rf $SOURCES/gcc-$GCC_VERSION

View File

@@ -0,0 +1,7 @@
export GCC_VERSION=15.2.0
IFS='.' read -r GCC_VERSION_MAJOR GCC_VERSION_MINOR GCC_VERSION_PATCH <<< $GCC_VERSION
export GCC_VERSION_MAJOR GCC_VERSION_MINOR GCC_VERSION_PATCH
export GCC_URL=https://mirror.ufs.ac.za/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.xz