Basile Starynkevitch <bas...@starynkevitch.net> writes: > However, I see a slightly more general use of executable_checksum (or > something similar) in plugins. Imagine a plugin that store some > information somewhere (e.g. in a database) and which might reload that > information later. It could be very useful (for that or such plugin[s]) > to store a [nearly] unique identifier of the GCC compiler using it with > the data (to avoid reusing the same data with a slightly different GCC > compiler, eg 4.5.1 vs 4.5.0). Then that plugin would be happy to use > the executable_checksum to avoid nightmares when incorrectly reusing > some data with a slightly different compiler. And version information is > not exactly adequate (the same gcc 4.5.0 could be built & configured > differently).
The executable_checksum is very precise, and almost any change to the compiler will change it. That is appropriate for a precompiled header, but I don't think it is appropriate for testing whether a plugin works. For a plugin, I think it should normally be sufficient to record the version and configuration information, both of which should be available (e.g., gcc -v can print them out). Ian