Created
December 21, 2017 00:25
-
-
Save JosiahOne/f847ce1fb09e18d5f5870f7c61e1b721 to your computer and use it in GitHub Desktop.
Install gcc prerequisites on macOS High Sierra
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
############################################################################### | |
# Script used to download, build, and install prerequisites for gcc on macOS. # | |
# Run this from the srcdir/ directory. # | |
############################################################################### | |
# Make infrastucture directory | |
mkdir infrastucture; | |
# Install GMP | |
set -e; | |
curl ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2 >> gmp.tar.bz2; | |
bzip2 -d gmp.tar.bz2; | |
tar -xf gmp.tar; | |
cp -r gmp-6.1.0/ infrastucture/gmp; | |
rm -r gmp-6.1.0; | |
rm gmp.tar; | |
cd infrastucture/gmp; | |
./configure; | |
make; | |
make check; | |
make install; | |
cd ../..; | |
set +e; | |
# Install MPFR | |
set -e; | |
curl ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2 >> mpfr.tar.bz2; | |
bzip2 -d mpfr.tar.bz2; | |
tar -xf mpfr.tar; | |
cp -r mpfr-3.1.4/ infrastucture/mpfr; | |
rm -r mpfr-3.1.4; | |
rm mpfr.tar; | |
cd infrastucture/mpfr; | |
./configure; | |
make; | |
make check; | |
make install; | |
cd ../..; | |
set +e; | |
# Install MPC | |
set -e; | |
curl ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz >> mpc.tar.gz; | |
tar -zxf mpc.tar.gz; | |
cp -r mpc-1.0.3/ infrastucture/mpc; | |
cd infrastucture/mpc; | |
./configure; | |
make; | |
make check; | |
make install; | |
cd ../..; | |
set +e; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment