Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 77746 - Enhancement request for gcc-config
Summary: Enhancement request for gcc-config
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Toolchain Maintainers
Depends on:
Reported: 2005-01-12 14:34 UTC by inxplanable
Modified: 2005-01-14 02:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description inxplanable 2005-01-12 14:34:45 UTC
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!

Reproducible: Always
Steps to Reproduce:
Comment 1 SpanKY gentoo-dev 2005-01-12 15:04:21 UTC
then just set PATH in your local user's env ... gcc wrappers search PATH for the real gcc binary

export PATH="/usr/i686-pc-linux-gnu/gcc-bin/3.3.5:${PATH}"
Comment 2 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-12 17:32:59 UTC

export PATH="/usr/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3.5:${PATH}"

that way, the wrapper is executed rather than /usr/i686-pc-linux-gnu/gcc-bin/3.3.5/gcc
Comment 3 SpanKY gentoo-dev 2005-01-12 17:37:25 UTC
yeah, what eradicator said ;)
Comment 4 inxplanable 2005-01-12 23:59:44 UTC
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 :)
Comment 5 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-13 01:14:54 UTC
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.
Comment 6 SpanKY gentoo-dev 2005-01-13 16:40:32 UTC
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
Comment 7 inxplanable 2005-01-14 02:04:41 UTC
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.