public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Bill Cunningham" <billcun@suddenlink.net>
To: "Jonathan Wakely" <jwakely.gcc@gmail.com>,	<gcc-help@gcc.gnu.org>
Subject: Re: gcc-4.6.0 breaks
Date: Thu, 02 Jun 2011 19:41:00 -0000	[thread overview]
Message-ID: <001001cc215c$ff7b99e0$a9d3daad@YOUREDC1953E71> (raw)
In-Reply-To: <BANLkTikMnqtcsseNaz=AMxbYwQtuOT6hOw@mail.gmail.com>

Jonathan Wakely wrote:
> 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 "$@"

    I see in .bash_profile that there is a PATH variable set. I have to put 
all my binaries in /usr to get the shell to recognize it. I know nothing 
about bash and would like to run a script that would allow me to simply run 
a script that would switch back and forth between compilers, assemblers, and 
the linker. Maybe 2 scripts. But I can't find the file that lists all my 
path data. env shows the path as does echo $PATH. I always log in as root 
anyway. If I want single user mode I add init=/bin/bash to the kernel switch 
of grub.

Bill

  parent reply	other threads:[~2011-06-02 19:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02  2:16 Dennis Clarke
2011-06-02  2:25 ` Bill Cunningham
2011-06-02  8:12   ` Jonathan Wakely
     [not found]     ` <002701cc2103$ef433780$a9d3daad@YOUREDC1953E71>
     [not found]       ` <BANLkTinaXqk2ts7q8n3-Uoa=z0B2-xwR6Q@mail.gmail.com>
2011-06-02 11:22         ` Bill Cunningham
2011-06-02 11:32           ` Jonathan Wakely
2011-06-02 12:17             ` Bill Cunningham
2011-06-02 14:11               ` Jonathan Wakely
2011-06-02 14:21                 ` Marc Glisse
2011-06-02 15:06                   ` Jonathan Wakely
2011-06-02 19:41                 ` Bill Cunningham [this message]
2011-06-02 18:28 ` kevin diggs
  -- strict thread matches above, loose matches on Subject: below --
2011-06-02  2:29 Dennis Clarke
2011-06-02  2:47 ` Bill Cunningham
2011-06-02  3:11   ` Bryan Hundven
2011-06-02  4:59     ` Miles Bader
2011-06-02  8:31       ` Bryan Hundven
2011-06-02  2:11 Bill Cunningham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001001cc215c$ff7b99e0$a9d3daad@YOUREDC1953E71' \
    --to=billcun@suddenlink.net \
    --cc=gcc-help@gcc.gnu.org \
    --cc=jwakely.gcc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).