On Jan 14, 2009, at 5:14 PM, Chris Quenelle wrote: > Dale Ghent wrote: >> /usr/bin/cc for example would be a shell script (or C program, >> whatever) >> that looks for a particular environment variable, eg; >> $SUN_STUDIO_VER. >> This variable could be set to "10" or "11" or "12" or a specific >> directory under /usr/compilers. > > What are the circumstances where it is possible/acceptable to set > the SUN_STUDIO_VER environment variable, but it's not possible/ > acceptable > to set the PATH variable to control where the compilers are coming > from?
The circumstances where it would be useful, you mean? Some things come to mind: 1) Easily switching between Sun Studio versions without having to rearrange $PATH 2) Some software being built from source could easily specify a specific version for it to be compiled with. 3) The need for a sysadmin to set the system-wide default for developers, while individual Sun Studio users are still free to set their own. The suggestion does seem sort of voodoo-ish, but aims to ease usability in terms of setting a default version of Sun Studio to use... and do this without jumping through hoops with $PATH or fooling around with symlinks somewhere under /usr to accomplish the same. The latter would impinge on sparse zones as Mr. Carlson pointed out earlier. It's just an idea for the issue of choosing compilers, use it (or not!) FWIW :) /dale