commit changes
This commit is contained in:
40
stage/toolchain/gcc.bash
Normal file
40
stage/toolchain/gcc.bash
Normal file
@@ -0,0 +1,40 @@
|
||||
|
||||
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
|
||||
|
||||
sed '/thread_header =/s/@.*@/gthr-posix.h/' -i libgcc/Makefile.in libstdc++-v3/include/Makefile.in
|
||||
|
||||
mkdir -p build && cd build
|
||||
|
||||
../configure \
|
||||
--build=$(../config.guess) \
|
||||
--host=$TARGET \
|
||||
--target=$TARGET \
|
||||
--prefix=/usr \
|
||||
--with-build-sysroot="$SYSROOT" \
|
||||
--enable-default-pie \
|
||||
--enable-default-ssp \
|
||||
--disable-nls \
|
||||
--disable-multilib \
|
||||
--disable-libatomic \
|
||||
--disable-libgomp \
|
||||
--disable-libquadmath \
|
||||
--disable-libsanitizer \
|
||||
--disable-libssp \
|
||||
--disable-libvtv \
|
||||
--enable-languages=c,c++ \
|
||||
LDFLAGS_FOR_TARGET=-L"$PWD/$TARGET/libgcc" \
|
||||
--silent \
|
||||
--quiet
|
||||
|
||||
make && make DESTDIR="$SYSROOT" install
|
||||
|
||||
ln -s gcc "$SYSROOT"/usr/bin/cc
|
||||
|
||||
cd "$SOURCES" && rm -rf gcc-$GCC_VERSION
|
||||
Reference in New Issue
Block a user