davidmalcolm/gcc-python-plugin — pull request #22 by kevin-dot-pyle (2014-06-05 03:42:49+00:00)
Title: Please pull build improvements (and one code fix) from master

This pull request covers various build system improvements and one minor bug fix in the generated C code.

Build system:
- Mark some fake targets as PHONY to improve make handling
- Support compiling a plugin for a gcc other than the compiler used to build the plugin. Commit b4d2623 provides this for cross-compilers of the same version as the build compiler. Commit c33eb32 makes this work if the host system cannot run output from the cross-compiler. Commit 1b44a06 extends this to allow compiling the plugin to run in a major version of gcc other than the one used to build it (e.g. build using gcc 4.8 to run in gcc 4.9, whether cross or native).
- Direct invocation of g++ when appropriate, rather than using gcc -x c++. This allows the Makefile to pass CXXFLAGS when needed, rather than passing CFLAGS to the C++ compiler.
- Parallel build fix: avoid competing runs of xml-to-h.py in parallel builds.
- Parallel build fix: ensure top level generated files used by gcc-c-api are generated before recursing into gcc-c-api, which assumes they will be present and has no rules to generate them.

Generated code bug fix:
- Using nullable_ptr caused a docstring of None to be converted into **(char*)"NULL"** in the generated C code, thereby documenting the object with the word NULL. Commit 650ae20 changes the code to instead generate an unquoted NULL, so that the object is recorded as having no documentation.