4 if [[ $# -eq 1 ]] ; then
7 GIT_REPO
=git
://gcc.gnu.org
/git
/gcc.git
8 SRCDIR
=${HOME}/software
11 PREFIX
=${HOME}/gcc-
${GCC_VERSION}
18 MAKEFLAGS
="-j$(($(grep -c '^processor' /proc/cpuinfo) + 1))"
22 MAKEFLAGS
="-j$(sysctl -n hw.ncpu)"
31 rm -rf ${BUILD} ||
exit $?
32 rm -rf ${PREFIX} ||
exit $?
33 mkdir
-p ${SRCDIR} ||
exit $?
35 if [ ! -e ${REPO} ]; then
37 git clone
${GIT_REPO} gcc ||
exit $?
41 git checkout releases
/gcc-
${GCC_VERSION} ||
exit $?
42 rm -rf gmp
* mpfr
* mpc
* isl
* ||
exit $?
43 .
/contrib
/download_prerequisites
44 mkdir
-p ${BUILD} ||
exit $?
45 cd ${BUILD} ||
exit $?
48 --disable-linux-futex \
51 --enable-languages=c
,c
++ \
52 --enable-threads=posix \
56 time { ${MAKE} -s && ${MAKE} -s install; }