This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: x86-win32 registry lookup patch


kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
>     The current code in prefix.c looks up GCC installation paths in the
>     windows registry; If the keys exist in the registry howerver, it has
>     the effect of screwing up other possibly incompatible versions of GCC
>     on the same system by essentially defining a nicely hidden value for
>     GCC_EXEC_PREFIX.
> 
> The point is that you are now supposed to use GCC_ROOT.  The reason
> for this method over the old one is that you can now relocate both
> native and cross-compilers.  I think disabling this option is a very
> bad idea.  We should instead encourage its use.

Encourage the use of which -- the registry key or GCC_ROOT? Note that 
I left GCC_ROOT exactly as is, I actually like that one[1], and allow/
disallow registry lookup via the --enable-win32-registry switch.

Sorry, but the registry key is a bad idea as it messes with other
installations in a hidden way. Unless it's written to be distribution
and version specific, by modifying the key, it should be at the
very least optionally compiled in.

> Moreover, the above isn't quite correct: all this does is change the *default
> *
> prefix used: GCC_EXEC_PREFIX continues to override that part of the default.

That's fine. GCC_EXEC_PREFIX is an environment variable that's *visible*,
as opposed to @GCC registry key that's invisible, and it hijacks other
installations on disk.

[1] For x86-win32 distributions, I add some patches that make these packages
completely relocatable without any environment variable. I believe this code
should eventually make its way into the GCC distributions, even if its use
is optional controlled via configure.

Regards,
Mumit


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]