added gcc bootstrap step
This commit is contained in:
81
build/gcc/build.bash
Normal file
81
build/gcc/build.bash
Normal file
@@ -0,0 +1,81 @@
|
||||
. $PROJECTDIR/build/gcc/package.env
|
||||
. $PROJECTDIR/build/gmp/package.env
|
||||
. $PROJECTDIR/build/isl/package.env
|
||||
. $PROJECTDIR/build/mpc/package.env
|
||||
. $PROJECTDIR/build/mpfr/package.env
|
||||
|
||||
fetch $GCC_URL
|
||||
fetch $GMP_URL
|
||||
fetch $ISL_URL
|
||||
fetch $MPC_URL
|
||||
fetch $MPFR_URL
|
||||
|
||||
cd $SOURCES && tar xf gcc-$GCC_VERSION.tar.xz && cd gcc-$GCC_VERSION
|
||||
|
||||
|
||||
bootstrap() {
|
||||
tar xf ../gmp-$GMP_VERSION.tar.xz && mv gmp-$GMP_VERSION gmp
|
||||
tar xf ../isl-$ISL_VERSION.tar.xz && mv isl-$ISL_VERSION isl
|
||||
tar xf ../mpc-$MPC_VERSION.tar.gz && mv mpc-$MPC_VERSION mpc
|
||||
tar xf ../mpfr-$MPFR_VERSION.tar.xz && mv mpfr-$MPFR_VERSION mpfr
|
||||
|
||||
sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64
|
||||
|
||||
mkdir -p build && cd build
|
||||
|
||||
../configure \
|
||||
--target=$TARGET \
|
||||
--prefix=$SYSROOT/cross \
|
||||
--with-glibc-version=2.43 \
|
||||
--with-sysroot=$SYSROOT \
|
||||
--with-newlib \
|
||||
--without-headers \
|
||||
--enable-default-pie \
|
||||
--enable-default-ssp \
|
||||
--disable-nls \
|
||||
--disable-shared \
|
||||
--disable-multilib \
|
||||
--disable-threads \
|
||||
--disable-libatomic \
|
||||
--disable-libgomp \
|
||||
--disable-libquadmath \
|
||||
--disable-libssp \
|
||||
--disable-libvtv \
|
||||
--disable-libstdcxx \
|
||||
--enable-languages=c,c++ > /dev/null
|
||||
|
||||
make > /dev/null && make install > /dev/null
|
||||
|
||||
cd ..
|
||||
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > `dirname $($TARGET-gcc -print-libgcc-file-name)`/include/limits.h
|
||||
}
|
||||
|
||||
|
||||
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
|
||||
7
build/gcc/package.env
Normal file
7
build/gcc/package.env
Normal 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
|
||||
|
||||
7
build/gmp/package.env
Normal file
7
build/gmp/package.env
Normal file
@@ -0,0 +1,7 @@
|
||||
export GMP_VERSION=6.3.0
|
||||
|
||||
IFS='.' read -r GMP_VERSION_MAJOR GMP_VERSION_MINOR GMP_VERSION_PATCH <<< $GMP_VERSION
|
||||
export GMP_VERSION_MAJOR GMP_VERSION_MINOR GMP_VERSION_PATCH
|
||||
|
||||
export GMP_URL=https://mirror.ufs.ac.za/gnu/gmp/gmp-$GMP_VERSION.tar.xz
|
||||
|
||||
7
build/isl/package.env
Normal file
7
build/isl/package.env
Normal file
@@ -0,0 +1,7 @@
|
||||
export ISL_VERSION=0.27
|
||||
|
||||
IFS='.' read -r ISL_VERSION_MAJOR ISL_VERSION_MINOR <<< $ISL_VERSION
|
||||
export ISL_VERSION_MAJOR ISL_VERSION_MINOR
|
||||
|
||||
export ISL_URL=https://libisl.sourceforge.io/isl-$ISL_VERSION.tar.xz
|
||||
|
||||
7
build/mpc/package.env
Normal file
7
build/mpc/package.env
Normal file
@@ -0,0 +1,7 @@
|
||||
export MPC_VERSION=1.3.1
|
||||
|
||||
IFS='.' read -r MPC_VERSION_MAJOR MPC_VERSION_MINOR MPC_VERSION_PATCH <<< $MPC_VERSION
|
||||
export MPC_VERSION_MAJOR MPC_VERSION_MINOR MPC_VERSION_PATCH
|
||||
|
||||
export MPC_URL=https://mirror.ufs.ac.za/gnu/mpc/mpc-$MPC_VERSION.tar.gz
|
||||
|
||||
7
build/mpfr/package.env
Normal file
7
build/mpfr/package.env
Normal file
@@ -0,0 +1,7 @@
|
||||
export MPFR_VERSION=4.2.2
|
||||
|
||||
IFS='.' read -r MPFR_VERSION_MAJOR MPFR_VERSION_MINOR MPFR_VERSION_PATCH <<< $MPFR_VERSION
|
||||
export MPFR_VERSION_MAJOR MPFR_VERSION_MINOR MPFR_VERSION_PATCH
|
||||
|
||||
export MPFR_URL=https://mirror.ufs.ac.za/gnu/mpfr/mpfr-$MPFR_VERSION.tar.xz
|
||||
|
||||
Reference in New Issue
Block a user