Hello All, Some plugins (including MELT, see http://gcc-melt.org/ for more) are made of several C++ source files which all include "plugin-version.h" because they have some C++ code which depends upon the particular version of GCC. So they typically code #if GCCPLUGIN_VERSION >= 4009 /* code for GCC 4.9 or newer. */ #else /* code for GCC 4.8 */ #endif /*GCCPLUGIN_VERSION*/ after including "plugin-version.h"; however that file also defines static data, notably `gcc_version`. That data symbol may be useless in most of the plugin files -except the one initializing the plugin. Having several useless data symbols may disturb the debugger (since the static symbol `gcc_version` is no longer unique) and may consume some tiny useless data (at least when the plugin is compiled with -O0). The attached small patch (for trunk svn rev. 217404) disables the definition of `gcc_version` when the preprocessor symbol GCCPLUGIN_SKIP_VERSION_DATA is defined as 1 before #include "plugin-version.h" ### gcc/ChangeLog entry: 2014-11-12 Basile Starynkevitch * configure.ac (plugin-version.h): Don't define version data when GCCPLUGIN_SKIP_VERSION_DATA was #define-d as 1. * doc/plugins.texi: (Plugins building): Document GCCPLUGIN_SKIP_VERSION_DATA. Put it with GCCPLUGIN_VERSION* names in the function index. ################### Ok for trunk? Comments are welcome. Regards -- Basile Starynkevitch http://starynkevitch.net/Basile