This is the mail archive of the 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: gcc executable for different OS revisions

[Get raw message]
Alexandre Oliva wrote:

> >   I have a specific problem with installation of gcc in a directory,
> > shared between machines with different OS revisions.
> If you really want to do it, you have to build on the oldest revision,
> and hope the OS remained backward-compatible.  This has been the case
> of Solaris.
> However, you still need fixinc'ed headers for the particular version
> of Solaris you're running, so keeping a single install tree for
> multiple OSs is not really feasible.

  No, it looks there was some misunderstanding. I don't want to have a
gcc binary for all OS revisions. I would like to have gcc binary
installed the
way g++ is installed. g++ binary is installed as
sparc-sun-solaris2.8-g++ when
it is compiled and installed on solaris2.8 and as
when it is installed from solaris2.5.1. So there is no problem
installing it to
shared /usr/local/ directory structure.

  Unfortunatelly, installation of gcc will overwrite any file named
already present in /usr/local/bin. So if I previously installed gcc for
solaris2.5.1, then solaris2.8 installation will overwrite gcc binary
solaris2.8 version.

  This problem ceould be solved by installing gcc binary as (for
sparc-sun-solaris2.5.1-gcc and sparc-sun-solaris2.8-gcc.

To make things even better, generic 'gcc' (and g++) shell script
(in usr/local/bin) could figure out *-*-*-gcc triplet and call
*-*-*-gcc binary automatically, depending on machine type script is
called from.

  This is the way, how some commercial programs are working. They
multiple binaries on server (one for each architecture) and a shell
script, which calls appropriate binary when user wants to run a program.

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