Un-hardcoding install location
Michael Meissner
meissner@cygnus.com
Wed Jul 5 06:43:00 GMT 2000
On Wed, Jul 05, 2000 at 08:52:04AM -0400, Jason McCampbell wrote:
> Hi All,
>
> I am looking for a verison of GCC that does not compile in it's installation
> directory. Does anyone know if such a version exists somewhere? Perhaps
> even part of the standard release tham I'm not aware of?
>
> Assuming not, are there any current projects or specs in this area? If I
> were to do the work myself is there any interest in the community for such a
> feature?
>
> Any feedback would be appreciated.
Sorry, I misread your question the first time as asking for building in a
different directory from the source directory. As of November 8th 1999, the
mainline GCC should have the ability to figure out where the installation
directory is by looking at how it was invoked. Ie, if the compiler was
originally compiled to be installed in:
/usr/compilers/gcc-today
and you renamed /usr/compilers/gcc-today to /usr/compilers/gcc-2000-07-05, and
invoked the compiler as:
/usr/compilers/gcc-2000-07-05/bin/gcc ...
it would automatically try to find the compiler proper, etc. in
/usr/compilers/gcc-2000-07-05/bin/../lib/gcc-lib/i686-linux/2.96/
If it doesn't find the compiler tools there, it will fall back to the compiled
in location. You can also use the -I, -B, -b, -V options and/or the
GCC_EXEC_PREFIX environment variable to specify where the installation
directories are.
--
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482
More information about the Gcc
mailing list