GCC版本中字段的含义 [英] Meaning of fields in the GCC version
问题描述
当我在我的Ubuntu上键入 gcc -v
时,我得到以下行(以及其他行):
gcc版本4.7.3(Ubuntu / Linaro 4.7.3-1ubuntu1)
所以我明白我的GCC版本是4.7.3。除此之外,这里还有两个字段:Ubuntu / Linaro和4.7.3-1ubuntu1。
我认为Ubuntu / Linaro意味着这个GCC生成可在Ubuntu上运行的可执行文件(相对于Cygwin而言) 。
我的问题是:
4.7.3-1ubuntu1是什么意思,为什么4.7.3-1ubuntu1和gcc版本4.7.3都包含相同的版本号? (当我在Red Hat上运行gcc -v时,也会发生这种情况:两个字符串包含相同的版本号。)
好的,我找到了我自己问题的答案。
括号内的字符串(Ubuntu / Linaro 4.7.3-1ubuntu1)告诉我们GCC的包以...运送。事实上,当我做 dpkg -l | grep gcc
我在输出中看到4.7.3-1ubuntu1。
这个字符串被设置为 - with-pkgversion
在配置GCC时(请参阅此链接中的 )。 (你可以在这里看到它。)
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 I understand that my GCC version is 4.7.3.
But in addition to that there are two more fields here: "Ubuntu/Linaro", and "4.7.3-1ubuntu1".
I guess that "Ubuntu/Linaro" means that this GCC produces executables that run on Ubuntu (in contrast, say, to Cygwin).
My question is:
What does "4.7.3-1ubuntu1" mean and why is it that both "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 strings contain the same version number.)
Alright, I found the answer to my own question.
The string in brackets ("Ubuntu/Linaro 4.7.3-1ubuntu1") tells us the package this GCC is shipped as. Indeed, when I do dpkg -l | grep gcc
I see "4.7.3-1ubuntu1" in the output.
This string is set with --with-pkgversion
when configuring GCC (see explanation in this link). (You can see it in action here.)
这篇关于GCC版本中字段的含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!