This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-4.2 compiled binaries running on a redhat-WS4 system
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: robert somerville <rbrt dot somerville at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 3 Feb 2012 11:43:48 +0000
- Subject: Re: gcc-4.2 compiled binaries running on a redhat-WS4 system
- References: <CAPge0vzOXoGB90EYNC8dZ8D4GQ3KTdG19NBxR=PQD3=krmpCsQ@mail.gmail.com>
On 3 February 2012 11:15, robert somerville wrote:
> it seems like we can run gcc-4.2 binaries on a redhat-ws4 system (main
> compiler gcc 3.6.4) .
Do you mean 3.4.6? There is no GCC 3.6
> I was a bit surprised . Forward comparability ,
> or gcc-4.2 libraries installed ?
You can run ldd on the binary to see which libs it uses.
If it's statically-linked or you have the 4.2 libs installed that
would explain it.
> ?Anybody care to comment on this or
> the reliability of same ?
G++ still uses the same ABI now as the 3.4 version, but there have
been many changes to the shared libraries for the C++ runtime and
standard library. If your 4.2-compiled binary happens to not use any
of the new symbols from the 4.2 libs then it will be able to use the
3.4 libs, but you can't rely on that and it's not supported.