plugins - GCC Wiki (original) (raw)
Background
Compiler plugins (or loadable modules) make it possible for a developer to add new features to the compiler without having to modify the compiler itself. Plugin support is available in GCC version 4.5.0 and later. Plugin functionality provides several advantages:
- It shortens the time needed to build and test new features. Only the code needed to implement the new functionality needs to be compiled, i.e. GCC doesn't need to be bootstrapped.
- It allows the development and maintenance of compiler features that for one reason or another are not suitable for inclusion in the main GCC distribution.
- It simplifies the job of developers who need to modify GCC but do not have the time or inclination to delve too much into the compiler internals.
This page contains links to API documentation and provides a directory of known GCC plugins. If you have any questions about developing your own compiler plugin, please contact us at gcc@gcc.gnu.org .
Documentation
- Plugins chapter in the GCC internals documentation.
- Plugins branch page with links to design documents, discussions and TODO lists.
- A series of posts on parsing C++ with GCC plugins: Part 1, Part 2, and Part 3.
- slides in French of a Solutions Linux talk (march 2010) about les greffons de GCC (GCC plugins in French)
- The july 2010 slides about extending GCC with MELT, while somewhat MELT centered, give some motivations and putative examples of application-specific or domain-specific GCC extensions, perhaps through plugins (or using MELT).
Compiler plugins repository
The following directory lists all the existing GCC plugins that we know about. Please note that these modules are not maintained by GCC developers, so asking about them on the GCC lists may not give you the answers you want (though, it is likely that plugin developers are also subscribed to the GCC lists).
If you have developed a plugin (under a GPL compatible license), add it to this list and let us know about it by posting an announcement on gcc@gcc.gnu.org .