46 lines
1.2 KiB
Bash
46 lines
1.2 KiB
Bash
|
|
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
|
|
|
|
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="$CROSS" \
|
|
--with-glibc-version=$GLIBC_VERSION \
|
|
--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++ \
|
|
--silent \
|
|
--quiet
|
|
|
|
make && make install
|
|
|
|
cd .. && cat gcc/limitx.h gcc/glimits.h gcc/limity.h > "`dirname $($TARGET-gcc -print-libgcc-file-name)`/include/limits.h"
|
|
|
|
cd "$SOURCES" && rm -rf gcc-$GCC_VERSION |