Re: [gentoo-user] Re: HowTo switch the default gcc
On 9 Oct, ds wrote: On 10/9/07, Helmut Jarausch [EMAIL PROTECTED] 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 -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] Re: HowTo switch the default gcc
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 . signature.asc Description: PGP signature
Re: [gentoo-user] Re: HowTo switch the default gcc
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 -- [EMAIL PROTECTED] mailing list
[gentoo-user] Re: HowTo switch the default gcc
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 -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] Re: HowTo switch the default gcc
On 10/9/07, Helmut Jarausch [EMAIL PROTECTED] 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
[gentoo-user] Re: HowTo switch the default gcc
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 -- [EMAIL PROTECTED] mailing list