how to switch compiler versions
Saifi Khan
saifi.khan at datasynergy.org
Thu Nov 5 02:01:38 PST 2009
On Thu, 5 Nov 2009, Sascha Wildner wrote:
> Saifi Khan schrieb:
> > Yes, i'm aware of CCVER and make.conf.
> >
> > What i had in mind was a utility like gcc-config. Please see
> > http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.4.1?view=markup
> >
> > Any pointers or observations in the context of BSD ?
>
> Why would we want an extra script/utility if one line in make.conf does the
> trick?
>
> Sascha
>
The 'trick' would still be implemented somewhere !
make.conf(5) man page talks about CCVER
. ..
Currently accepted values for compilers which are part of
DragonFly are ``gcc41'' (default) and ``gcc44''.
and it also mentions a caveat,
. ..
It should be set as CCVER?= so as not to interfere with over-
rides from userland. We currently recommend that an over-ride
NOT be set in /etc/make.conf.
. ..
Please consider this usecase:
A user installed DragonFly BSD 2.4.1 and has 'gcc 4.1.2'
An update/installation of some software package on the same
system, gets the user 'gmake' and 'gcc 4.4.x'.
The user goes to the command line and types 'whereis gcc'.
(S)he he sees the result as '/usr/bin/gcc' the default, when
actually there are two versions available.
'gcc41' and 'gcc44' are just atoms that trigger bin paths, crt0's
and linker path setups one way or the other, somewhere in the
make.conf or some such file code.
Having a utility helps make a conscious selection of the build
environment and it better be 'visible' than be a 'trick' !
When gcc 4.1.x was deployed on most systems and you wanted to
use qemu, the compiler still had to be switched to 3.3.6 .
There were many packages that needed 3.3.6 but qemu was the most
visible requirement. More often than not CCVER in make.conf has
bitten dev and users.
Certainly, the convenience of CCVER as part of CCVER= make ...
should not be under estimated.
thanks
Saifi.
More information about the Users
mailing list