diff options
Diffstat (limited to 'chapter5/gcc.sh')
-rw-r--r-- | chapter5/gcc.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/chapter5/gcc.sh b/chapter5/gcc.sh new file mode 100644 index 0000000..c5404d1 --- /dev/null +++ b/chapter5/gcc.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +mkdir -p mpfr gmp mpc +tar -xf ../mpfr-*.tar.xz -C mpfr --strip-components=1 +tar -xf ../gmp-*.tar.xz -C gmp --strip-components=1 +tar -xf ../mpc-*.tar.gz -C mpc --strip-components=1 + +case $(uname -m) in + x86_64) + sed -e '/m64=/s/lib64/lib/' \ + -i.orig gcc/config/i386/t-linux64 + ;; +esac + +mkdir -v build +cd build + +../configure \ + --target=${LFS_TGT} \ + --prefix=${LFS}/tools \ + --with-glibc-version=2.11 \ + --with-sysroot=${LFS} \ + --with-newlib \ + --without-headers \ + --enable-initfini-array \ + --disable-nls \ + --disable-shared \ + --disable-multilib \ + --disable-decimal-float \ + --disable-threads \ + --disable-libatomic \ + --disable-libgomp \ + --disable-libquadmath \ + --disable-libssp \ + --disable-libvtv \ + --disable-libstdcxx \ + --enable-languages=c,c++ && + +make && +make -j1 install && + +cd .. +cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ + `dirname $(${LFS_TGT}-gcc -print-libgcc-file-name)`/install-tools/include/limits.h
\ No newline at end of file |