------- Comment #3 from amylaar at gcc dot gnu dot org 2010-06-08 09:56 ------- (In reply to comment #2) > "By switching the GCC build language to C++, we introduce name mangling, > which means that we loose plugin dynamic link compatibility to previous > versions of gcc. Also, the interface becomes subject to change when mangling > changes, and will not be compatible if the build compiler uses a different > mangling scheme. Moreover, it forces to compile plugins with C++." > > > Exactly as designed.
I don't recall any specification for our plugins that says we can use any implementation language, as long it is C++. > We do not have a plugin interface (our interface > is called dlopen). Plugins have to deal with that. As per plugins.texi, the documented way to pass the GPL license test only works when the plugin is compiled as C code. "int plugin_is_GPL_compatible;" will give a different mangled symbol name when compiled as C++. The comment at the start of gcc-plugin.h states: "Public header file for plugins to include", hence this is part of the plugin interface. The way this header file is now, it will not work when the compiler is built with a C++ compiler, but the plugin is build with a C compiler. Hence, plugins will not work as documented when the compiler is build with a C++ compiler, no matter what compiler you use for the plugins. A small change to the header files will go a long way to allow simple plugins to continue to work as advertised, and preserve interoperability with more languages and compilers, including possible future variants of g++ with mangling differences. -- amylaar at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|WONTFIX | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44459