Joseph S. Myers wrote:

> I agree with checking once at startup, but that should be GCC's job, not 
> the plugin's. 

Yes.

> The plugin should export the exact version string and 
> target triplet (and maybe configure options) of the compiler it was built 
> to be plugged into (the configure macros / build support provided for use 
> of plugins should make this automatic).  GCC should check these at 
> startup.

Unless we have a lot more stability in plugin API than I expect we're
actually going to have at first, I suggest we check something like the
md5sum of the GCC binary itself.  (Yes, I see the recursive problem in
building such a binary.)  The chances that my plugin will work with your
compiler seem near-zero, and the failure modes will be ugly.

But, plugins for a popular compiler binary (e.g., that associated with a
GNU/Linux distribution, or with a compiler distribution) would make sense.

-- 
Mark Mitchell
CodeSourcery
m...@codesourcery.com
(650) 331-3385 x713

Reply via email to