This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [plugins] [patch] Initial implementation of GCC plugin support


On 2/23/09 4:37 PM, Joseph S. Myers wrote:

> Your plugin can't have been using the real.h structures, which changed 
> between 4.3.1 and 4.3.2, then.  There are no guarantees of ABI 
> compatibility even within a release branch, and simply checking the full 
> version and refusing to continue if it doesn't match avoids the 
> possibility of a whole class of nasty memory corruption bugs with plugins.  
> It's also vastly simpler than e.g. trying to hash the contents of all the 
> datastructures that form part of the interface to GCC.  (Checking the 
> configure options avoids problems with HOST_WIDE_INT varying depending on 
> configure options for the same target.)

Yes, we realize that there are no guarantees, and that things may break.
That doesn't mean GCC should make drastic rules rejecting plugins that don't
match exactly.

> 
>> for us to be able to ship the same plugin for all versions of Fedora Core X,
>> or Debian X, rather than tie it so tightly to a particular minor version.
> 
> It's very likely you could ship the same plugin sources, which would then 
> need to be built to separate binaries for each different GCC version.

Building the plugin requires having the GCC sources, not just the plugin
sources. GCC sources don't normally come with distros, so you have to go
through fairly complicated hoops to get the GCC sources which match the
binaries installed on your system.

Mozilla would like to avoid shipping many copies of the plugins, when
normally a single copy will do the job, and it's even possible to provide a
single copy that works around multiple versions of GCC.

--BDS


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]