This repository has been archived by the owner on Mar 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 238
Symlink GCC
Shaun Jackman edited this page Mar 24, 2017
·
1 revision
Create symlinks for /usr/bin/gcc
in $(brew --prefix)/bin
These instructions are unneeded on Ubuntu or Debian, or if your preferred compiler already has GCC executables found in your path named gcc-4.?
, gcc-5
, or gcc-6
.
ln -s $(which gcc) $(brew --prefix)/bin/gcc-$(gcc -dumpversion |cut -d. -f1)
ln -s $(which g++) $(brew --prefix)/bin/g++-$(g++ -dumpversion |cut -d. -f1)
ln -s $(which gfortran) $(brew --prefix)/bin/gfortran-$(gfortran -dumpversion |cut -d. -f1)
brew install hello && brew test hello; brew remove hello
ln -s $(which gcc) $(brew --prefix)/bin/gcc-$(gcc -dumpversion |cut -d. -f1,2)
ln -s $(which g++) $(brew --prefix)/bin/g++-$(g++ -dumpversion |cut -d. -f1,2)
ln -s $(which gfortran) $(brew --prefix)/bin/gfortran-$(gfortran -dumpversion |cut -d. -f1,2)
brew install hello && brew test hello; brew remove hello
sudo yum install gcc44 gcc44-c++
ln -s /usr/bin/gcc44 $(brew --prefix)/bin/gcc-4.4
ln -s /usr/bin/g++44 $(brew --prefix)/bin/g++-4.4
ln -s /usr/bin/gfortran44 $(brew --prefix)/bin/gfortran-4.4
brew install --cc=gcc-4.4 hello && brew test hello; brew remove hello