Re: gcc-4.6.0 breaks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2 June 2011 13:17, Bill Cunningham wrote:
>
>   Ok but I have another question concerning gcc. I would like to have 2
> compilers. A default and one perhaps in /usr/local or another directory. How
> can I switch back and forth between which compiler I want?

The same way you'd choose between any two programs in different locations.

You could adjust your $PATH or write a script which calls the one you want.

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 "$@"



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux