I think it would be useful if there were /var/db/pkg/*/*/COMPILER file. There is plenty of data stored about installed packages. I think if the equivalent of "gcc-config -c" were stored in a file there (perhaps named COMPILER) could be useful for a couple of things. This information also seems to be available in "/etc/env.d/gcc/config-*". I realize that alternative compilers such as icc are possible, but surely it could be normalized somehow. An example useful scenario is when migrating to a new compiler, often the user either cannot or doesn't have to recompile every single package on their system with the new compiler, but it is near impossible to know which have been compiled with the new compiler. Reproducible: Always
This should really be discussed on the gentoo-dev mailing list. We may want to do something that's cross-language, since gcc only applies to C/C++ apps.
well, I can think of one way to deal with things in a cross platform way. We could simply have several variables in the file, one for each of what we consider to be a "compiler". Something like this: GCC=i686-pc-linux-gnu-4.4.0 PYTHON=2.6.2-r1 and so forth, whatever compiler versions that were available for that particular emerge. I'm sure there could be a better way to do it, but this approach would be pretty straight forward.
We may want to add some sort of EAPI extension for this, so that ebuilds can explicitly register the compiler(s) that they use.
*** Bug 435156 has been marked as a duplicate of this bug. ***
The VDB specifiction is not part of PMS. (In reply to Zac Medico from comment #1) > This should really be discussed on the gentoo-dev mailing list. Right. Feel free to reopen if there is consent in the -dev ML.
Also note that nowadays vardb contains CC and CXX files for this purpose.
@Michał Górny, while I agree that this bug issue is currently no longer in scope, the CC and CXX files do NOT supply the type of information that I was suggesting. They contain things like "x86_64-pc-linux-gnu-g++" or "x86_64-pc-linux-gnu-gcc". What I was looking for was not only which compiler was used, but more importantly, what VERSION of that compiler was used.
(In reply to Evan Teran from comment #7) > @Michał Górny, while I agree that this bug issue is currently no longer in > scope, the CC and CXX files do NOT supply the type of information that I was > suggesting. > > They contain things like "x86_64-pc-linux-gnu-g++" or > "x86_64-pc-linux-gnu-gcc". What I was looking for was not only which > compiler was used, but more importantly, what VERSION of that compiler was > used. Well, if you do what I do, that is: GCC_PV=4.8.3 CC=${CHOST}-gcc-${GCC_PV} CXX=${CHOST}-g++-${GCC_PV} you'd have that info there as well :). In fact, I think Gentoo should do such CC/CXX by default.