Created
May 28, 2014 04:08
-
-
Save zmwangx/e82608d7feb600446b47 to your computer and use it in GitHub Desktop.
Successful build of GCC 4.9.0 on OS X 10.9.3.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# setup: | |
# installed ports are listed at http://goo.gl/x0tTpu | |
# almost clean /usr/local | |
# download the source tarballs | |
# cloog, gmp, isl, mpc, mpfr, and most importantly, gcc | |
cd ~/src/tarballs | |
wget -q ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.18.1.tar.gz | |
wget -q ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-4.3.2.tar.bz2 | |
wget -q ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.12.2.tar.bz2 | |
wget -q ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-0.8.1.tar.gz | |
wget -q ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-2.4.2.tar.bz2 | |
wget -q ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.gz | |
# extract the tarballs, dependencies into the gcc source directory | |
# gcc extraction is likely to take long due to size and file count | |
tar -xzf gcc-4.9.0.tar.gz | |
mv gcc-4.9.0 ~/src/gcc | |
tar -xzf cloog-0.18.1.tar.gz | |
mv cloog-0.18.1 ~/src/gcc/cloog | |
tar -xzf gmp-4.3.2.tar.bz2 | |
mv gmp-4.3.2 ~/src/gcc/gmp | |
tar -xzf isl-0.12.2.tar.bz2 | |
mv isl-0.12.2 ~/src/gcc/isl | |
tar -xzf mpc-0.8.1.tar.gz | |
mv mpc-0.8.1 ~/src/gcc/mpc | |
tar -xzf mpfr-2.4.2.tar.bz2 | |
mv mpfr-2.4.2 ~/src/gcc/mpfr | |
# all set, ready to build | |
cd ~/build | |
mkdir gcc; cd gcc | |
~/src/gcc/configure --enable-languages=c,c++ | tee configure_output | |
# output omitted, see configure_output at http://goo.gl/D7a0R4 | |
make -j4 | tee make_output | |
# took me more than an hour on 2.9 GHz Intel Core i7 (MacBook Pro 13'' | |
# mid-2012) | |
# output omitted, see make_output at http://goo.gl/1HpW9x | |
sudo make -j4 install | tee make_install_output | |
# output omitted, see make_install_output at http://goo.gl/tQww7N |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment