public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] HowTo switch the default gcc
@ 2007-10-08  9:18 Helmut Jarausch
  2007-10-08 17:29 ` [gentoo-user] " Marc Blumentritt
  0 siblings, 1 reply; 7+ messages in thread
From: Helmut Jarausch @ 2007-10-08  9:18 UTC (permalink / raw
  To: gentoo-user

Hi,

my current default gcc is of version 4.1.2 but I would like to
switch to version 4.2.1.

As root (only) I can do

gcc-config i686-pc-linux-gnu-4.2.1

but this switch is lost after re-login.
Furthermore I cannot switch in non-root mode.
(BTW I'm using the zshell)

Many thanks for a hint,

Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-user]  Re: HowTo switch the default gcc
  2007-10-08  9:18 [gentoo-user] HowTo switch the default gcc Helmut Jarausch
@ 2007-10-08 17:29 ` Marc Blumentritt
  2007-10-09  7:48   ` Helmut Jarausch
  0 siblings, 1 reply; 7+ messages in thread
From: Marc Blumentritt @ 2007-10-08 17:29 UTC (permalink / raw
  To: gentoo-user

Helmut Jarausch schrieb:
> Hi,
> 
> my current default gcc is of version 4.1.2 but I would like to
> switch to version 4.2.1.
> 
> As root (only) I can do
> 
> gcc-config i686-pc-linux-gnu-4.2.1
> 
> but this switch is lost after re-login.
> Furthermore I cannot switch in non-root mode.
> (BTW I'm using the zshell)
> 
> Many thanks for a hint,

Have a look at http://www.gentoo.org/doc/en/change-chost.xml
It shows how to remove old gcc config after change of chost. I think you
can use this.

Regards
Marc

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user]  Re: HowTo switch the default gcc
  2007-10-08 17:29 ` [gentoo-user] " Marc Blumentritt
@ 2007-10-09  7:48   ` Helmut Jarausch
  2007-10-09 12:19     ` Marc Blumentritt
  2007-10-09 20:09     ` ds
  0 siblings, 2 replies; 7+ messages in thread
From: Helmut Jarausch @ 2007-10-09  7:48 UTC (permalink / raw
  To: gentoo-user

On  8 Oct, Marc Blumentritt wrote:
> Helmut Jarausch schrieb:
>> Hi,
>> 
>> my current default gcc is of version 4.1.2 but I would like to
>> switch to version 4.2.1.
>> 
>> As root (only) I can do
>> 
>> gcc-config i686-pc-linux-gnu-4.2.1
>> 
>> but this switch is lost after re-login.
>> Furthermore I cannot switch in non-root mode.
>> (BTW I'm using the zshell)
>> 
>> Many thanks for a hint,
> 
> Have a look at http://www.gentoo.org/doc/en/change-chost.xml
> It shows how to remove old gcc config after change of chost. I think you
> can use this.
> 
Thanks,
but what value of CHOST should I take?
I currently have
CHOST="i686-pc-linux-gnu"
and gcc-4.1.2 is the standard C-compiler.
Now, I'd like to switch to gcc-4.2.1.

Helmut.

-- 
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-user]  Re: HowTo switch the default gcc
  2007-10-09  7:48   ` Helmut Jarausch
@ 2007-10-09 12:19     ` Marc Blumentritt
  2007-10-09 20:09     ` ds
  1 sibling, 0 replies; 7+ messages in thread
From: Marc Blumentritt @ 2007-10-09 12:19 UTC (permalink / raw
  To: gentoo-user

Helmut Jarausch schrieb:
> but what value of CHOST should I take?
This is OK. I did not send this link for CHOST, but for the part of
checking the gcc config.

> I currently have
> CHOST="i686-pc-linux-gnu"
> and gcc-4.1.2 is the standard C-compiler.
> Now, I'd like to switch to gcc-4.2.1.

Have a look at /etc/env.d/05gcc and the files in /etc/env.d/gcc

I think it should be enough to change /etc/env.d/gcc/config to your
liking and then run

env-update && source /etc/profile

Anyway, I always thought, that setting gcc with gcc-config should be
enough. Perhaps you should use the -f option?

Regards,
Marc

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Re: HowTo switch the default gcc
  2007-10-09  7:48   ` Helmut Jarausch
  2007-10-09 12:19     ` Marc Blumentritt
@ 2007-10-09 20:09     ` ds
  2007-10-10  8:41       ` Helmut Jarausch
  1 sibling, 1 reply; 7+ messages in thread
From: ds @ 2007-10-09 20:09 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 961 bytes --]

On 10/9/07, Helmut Jarausch <jarausch@igpm.rwth-aachen.de> wrote:

> Thanks,
> but what value of CHOST should I take?
> I currently have
> CHOST="i686-pc-linux-gnu"
> and gcc-4.1.2 is the standard C-compiler.
> Now, I'd like to switch to gcc-4.2.1.

There is an official guide to upgrading gcc
http://www.gentoo.org/doc/e <http://www.gentoo.org/doc/en/gcc-upgrading.xml>
n/gcc-upgrading.xml <http://www.gentoo.org/doc/en/gcc-upgrading.xml>

Since you are already at version 4 it looks like you'll need to do the
following:

# emerge -uav gcc

(Please substitute "i686-pc-linux-gnu-4.1.1" with the GCC
version and CHOST settings you've upgraded to:)
# gcc-config i686-pc-linux-gnu-4.1.1
# env-update && source /etc/profile

(Rebuilding libtool)
# emerge --oneshot -av libtool

The authors of the guide also recommend

# emerge -eav system
# emerge -eav world

It must be the env-update && source /etc/profile that keeps your new
settings

Regards,
dsitsolutions

[-- Attachment #2: Type: text/html, Size: 1527 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Re: HowTo switch the default gcc
  2007-10-09 20:09     ` ds
@ 2007-10-10  8:41       ` Helmut Jarausch
  2007-10-10  9:08         ` Neil Bothwick
  0 siblings, 1 reply; 7+ messages in thread
From: Helmut Jarausch @ 2007-10-10  8:41 UTC (permalink / raw
  To: gentoo-user; +Cc: ds

On  9 Oct, ds wrote:
> On 10/9/07, Helmut Jarausch <jarausch@igpm.rwth-aachen.de> wrote:
> 
>> Thanks,
>> but what value of CHOST should I take?
>> I currently have
>> CHOST="i686-pc-linux-gnu"
>> and gcc-4.1.2 is the standard C-compiler.
>> Now, I'd like to switch to gcc-4.2.1.
> 
> There is an official guide to upgrading gcc
> http://www.gentoo.org/doc/e <http://www.gentoo.org/doc/en/gcc-upgrading.xml>
> n/gcc-upgrading.xml <http://www.gentoo.org/doc/en/gcc-upgrading.xml>

which I have followed.
> 
> Since you are already at version 4 it looks like you'll need to do the
> following:
> 
> # emerge -uav gcc
> 
> (Please substitute "i686-pc-linux-gnu-4.1.1" with the GCC
> version and CHOST settings you've upgraded to:)
> # gcc-config i686-pc-linux-gnu-4.1.1
> # env-update && source /etc/profile
> 
> (Rebuilding libtool)
> # emerge --oneshot -av libtool

This does not suffice here.
e.g. in /etc/profile.env  the environment variable PATH begins with
export PATH='/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:
                      this doesn't exist anymore =====^^^^^ 
            /usr/i686-pc-linux-gnu/gcc-bin/4.1.2
            this hides version 4.2.1 ======^^^^^
             /usr/i686-pc-linux-gnu/gcc-bin/4.2.1:

What part of portage generates /etc/profile.env

> 
> The authors of the guide also recommend
> 
> # emerge -eav system
> # emerge -eav world

Is that really necessary within the gcc-4.x family ?

> 
> It must be the env-update && source /etc/profile that keeps your new
> settings

Many thanks,
Helmut.

-- 
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Re: HowTo switch the default gcc
  2007-10-10  8:41       ` Helmut Jarausch
@ 2007-10-10  9:08         ` Neil Bothwick
  0 siblings, 0 replies; 7+ messages in thread
From: Neil Bothwick @ 2007-10-10  9:08 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

Hello Helmut Jarausch,

> This does not suffice here.
> e.g. in /etc/profile.env  the environment variable PATH begins with
> export PATH='/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:
>                       this doesn't exist anymore =====^^^^^ 
>             /usr/i686-pc-linux-gnu/gcc-bin/4.1.2
>             this hides version 4.2.1 ======^^^^^
>              /usr/i686-pc-linux-gnu/gcc-bin/4.2.1:
> 
> What part of portage generates /etc/profile.env

/etc/env.d - /etc/env.d/05gcc* in this case.


-- 
Neil Bothwick

This tagline SHAREWARE. Send .

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-10-10  9:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-08  9:18 [gentoo-user] HowTo switch the default gcc Helmut Jarausch
2007-10-08 17:29 ` [gentoo-user] " Marc Blumentritt
2007-10-09  7:48   ` Helmut Jarausch
2007-10-09 12:19     ` Marc Blumentritt
2007-10-09 20:09     ` ds
2007-10-10  8:41       ` Helmut Jarausch
2007-10-10  9:08         ` Neil Bothwick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox