Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Switching gcc
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 340

PostPosted: Sat Dec 17, 2022 10:51 am    Post subject: Switching gcc Reply with quote

I have gcc 11 and 12 installed, while 12 is default.
Is is possible to install specific package with gcc 11?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3953

PostPosted: Sat Dec 17, 2022 11:01 am    Post subject: Reply with quote

For permanent solution create a file
Code:

/etc/portage/env/gcc11.conf -->>
CC=/usr/bin/gcc-<version>
CXX=/usr/bin/g++-<version>

Then append to
Code:

echo "<full-name-of>/<package>   gcc11.conf"  >> /etc/portage/package.env

for on the go solution
Code:

eselect gcc list
eselect gcc set <index-of-11>

or
Code:

gcc-config --list-profiles
gcc-config <profile-index-11>

If using the on the go method please remember to revert back to gcc12.
_________________
:)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum