gcc-config currently runs only as root, which means if a user wants to use
a different gcc, he/she has to change configuration on his own. This is quite
a problem if root wants to use only stable gcc!
Steps to Reproduce:
then just set PATH in your local user's env ... gcc wrappers search PATH for the real gcc binary
that way, the wrapper is executed rather than /usr/i686-pc-linux-gnu/gcc-bin/3.3.5/gcc
yeah, what eradicator said ;)
Thats exactly what I do! Its just that I think gcc-config should be usable by
a user also. If you guys dont then of course its no big deal :)
If it's something you feel strongly about, submit a patch and we'll consider it, but I don't think vapier or I really feel like adding this support ourselves.
A good place to look would be the java-config util. It create files in ~/.gentoo or something like that which get sourced in the user's .bashrc... Then add a command line arg (like -u or something) to toggle on that behavior.
the problem would be in supporting XXX shell with XXX config files
if you have an idea, propose a patch, but i've tought about it in the past (because ive had people mention it) but couldnt think of a CLEAN solution
I agree, problem is more subtler then I thought. And yes, perhaps not many people need this kind of feature. Anyway, I will try a solution.
Suppose the user specific choice is dropped as ~/.env.d/<gcc-profile-name>
and system specific choice in /etc/env.d
Then one can make env-update user aware. Let it generate ~/.profile.env and/or ~/.csh.env if user executes it or otherwise it generates /etc/profile.env and/or /etc/csh.env. Of course this also means that it should also consider ~/.env.d for additions/replacements. Then the shell specific files like /etc/profile or /etc/zsh/zprofile should be modified to use ~/.profile.env file if it exists instead of system wide profile.env.
Is that workable and/or acceptable? If yes then I wouldnt mind working on a patch for gcc-config, /etc/profile and /etc/zsh/zprofile etc. However env-update is beyond me. I dont know python.