I installed gcc with homebrew:
$ brew install gcc
I can see the result:
$ brew list ant gcc go libyaml postgresql tmux autoconf gdb isl mpfr python valgrind automake gdbm libevent openssl readline wget binutils git libmpc ossp-uuid ruby xz cloog gmp libtool pkg-config sqlite
I also see
$ ls /usr/local/bin ... gcc-4.9 ...
The issue is that typing
gcc still refers to the system gcc
$ which gcc /usr/bin/gcc
I wanted to rename
gcc, but I don't want to break anything in homebrew. Specifically, I'd like to rename it in such a way that homebrew is aware of the change and running
brew update will know to link the newly updated version to the name
Can this be done?
$ which gcc /usr/local/bin/gcc $ gcc -v ... version XXX $ brew update ... new gcc version YYY installed in /usr/local/bin/gcc $ which gcc /usr/local/bin/gcc $ gcc -v ... version YYY