This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to tell which compiler was used?
- From: Ian Lance Taylor <iant at google dot com>
- To: Yan Seiner <yan at seiner dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 29 May 2007 18:08:48 -0700
- Subject: Re: How to tell which compiler was used?
- References: <465C303F.7060101@seiner.com>
Yan Seiner <yan@seiner.com> writes:
> I have a set of binaries that were cross-compiled. The manufacturer
> supplies 2 gcc- based toolchains.
>
> I'd like to find out which toolchain was used to build the binaries.
>
> One is based on gcc-3.3, the other is based on gcc-4.0.1.
>
> Is there some way to tell which compiler was used to build a
> particular binary?
On GNU/Linux systems you can generally look at the contents of the
.comment section. This can be printed using, e.g.,
objdump -s -j .comment
If you have some other system, you need to tell us what it is.
Ian