Meaning of fields in the GCC version

When I type gcc -v

on my Ubuntu, I get the following line (among other lines):

gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)

      

So my understanding is that my version of GCC is 4.7.3.

But in addition to that, there are two more fields here: "Ubuntu / Linaro" and "4.7.3-1ubuntu1".

I assume "Ubuntu / Linaro" means that this GCC creates executables that run on Ubuntu (as opposed to, say, Cygwin).

My question is:

What does "4.7.3-1ubuntu1" mean, and why do "4.7.3-1ubuntu1" and "gcc version 4.7.3" contain the same version number? (This also happens when I run "gcc -v" on Red Hat: the two lines contain the same version number.)

0


source to share


2 answers


Ok, I found the answer to my question.

The line in parentheses ("Ubuntu / Linaro 4.7.3-1ubuntu1") tells us that this GCC package is shipped as. Indeed, when I do dpkg -l | grep gcc

, I see "4.7.3-1ubuntu1" in the output.



This line is set using --with-pkgversion

when configuring GCC (see explanation in this link ). (You can see it in action here .)

+1


source


"4.7.3-1ubuntu1" is the version in the packaging distribution system.



Ubuntu uses apt / dpkg / deb for its packaging, so this is the version you are using.

+1


source







All Articles