[csw-maintainers] Reasons for gcc to have a separate prefix
Peter FELECAN
pfelecan at opencsw.org
Mon Aug 29 19:14:42 CEST 2011
Maciej Bliziński <maciej at opencsw.org> writes:
> However, alternatives are not a viable solution for the buildfarm. We
> all work on the same hosts and we need to make it possible to build
> with gccN and gcc(N+1) at the same time. You can't have buildfarm
> admins flip symlink every time a maintainer wants to switch between
> e.g. gcc-3 and gcc-4.
Just a follow up on my own advice to look how Debian does it...
* How Debian manages multiple versions of GCC
Useful information is found, on an installed system, in
/usr/share/doc/gcc/README.Debian
** Default version
Each Debian release has a default set of compilers issued by a
generic source package called gcc-defaults
(http://ftp.de.debian.org/debian/pool/main/g/gcc-defaults/gcc-defaults_1.107.tar.gz)
The generated packages supply a symbolic link toward the default
driver, e.g., for the C compiler, there is /usr/bin/gcc which point
toward /usr/bin/gcc-4.6
Note that you find the README.Debian in the above mentioned source
package.
** Alternatives
Alternatives are used at a higher level, e.g., /usr/bin/cc is an
generic name, having cc as the alternative name with a possible
alternative path of /usr/bin/gcc
** Using a non default version
When compiling with a non-default version of the compiler you must
explicitly specify the one that you wish to use, e.g.
CC=gcc-4.1 ./configure <configure options>
** File-system organization
each version of GCC provides its specific components installed in
corresponding directories; e.g., /usr/lib/gcc/i486-linux-gnu/4.3;
this organization is directly supported by the GCC build system,
i.e., it doesn't need modifications
** Run-time shared libraries
The run-time shared libraries conforms with the shared libraries
policy and thus supports multiple releases installed simultaneously
with one default version.
* How Open CSW should manage multiple versions of GCC
I don't discuss here the integration of Sun Studio in the
alternatives system but that would be a nice feature.
** Default version
the most recent version of GCC is considered as the default one and
provides the /usr/bin/gcc symbolic link
** Alternatives
Use the cc as the generic name
** Using a non default version
Same as Debian
** File-system organization
Similar with that of Debian
** Run-time shared libraries
Similar with that of Debian
--
Peter
More information about the maintainers
mailing list