On Thu, 2 Jun 2011, Jonathan Wakely wrote:
I have a handful of versions installed in ~/gcc/ and invoke them via a script like #!/bin/bash : ${ver:=4.7} : ${libdir:=lib64} $HOME/gcc/$ver/bin/g++ -Wl,-rpath,$HOME/gcc/$ver/$libdir -Wall -g "$@"
When you have many versions, it may be more convenient to add a spec file that does the rpath thing. This way you can call any g++ in any way without bothering with wrappers and without risk.
-- Marc Glisse