[GCC-XML] Fwd: Re: GCC backend upgrade
Alex Leach
beamesleach at gmail.com
Sun Feb 10 17:13:49 EST 2013
On Sun, 10 Feb 2013 20:48:57 -0000, Andrej Mitrovic
<andrej.mitrovich at gmail.com> wrote:
> On 2/10/13, Alex Leach <beamesleach at gmail.com> wrote:
>> 1. Part 1 and 2 of this blog post:
>>
>> http://www.codesynthesis.com/~boris/blog/2010/05/10/parsing-cxx-with-gcc-plugin-part-2/
>> 2. gcc-python plugin source code:
>
> Hmm is this Posix only? (i.e. only SO support but not DLLs?)
I've just been reading up a bit on this on the GCC mailing list.
It seems that the GNU hello plugin has been made to work on Windows, but a
custom build of GCC was needed, with a couple of extra configure variables
set. Not sure if the proposed patch was incorporated into release versions
of GCC though.
See this messsage and its first response for a bit more info on it:
http://gcc.gnu.org/ml/gcc/2010-07/msg00069.html
Also, thought I'd give some instructions on how to invoke the plugin (not
that it works!), as a quick reference...
# checkout the repository
$ git clone git at github.com:alexleach/gccxml.git
$ cd gccxml
# switch to 'plugin' branch
$ git checkout plugin
# build debug version. This currently builds all of the patched GCC
backend too..
$ mkdir build && cd build
$ cmake config -DCMAKE_BUILD_TYPE=Debug ..
$ make -j6 gccxml_plugin
The built plugin will be in your build directory, at
./GCC/gcc/libgccxml_plugin.so
On Unix machines, add this folder to your LD_LIBRARY_PATH.
e.g.
$ export LD_LIBRARY_PATH="$PWD/GCC/gcc:$LD_LIBRARY_PATH"
On Windows, I guess change to the directory which contains the plugin.
# Load the gcccxml plugin, telling it to try and process one of the
provided GCC_XML test files.
> g++ -fplugin=libgccxml_plugin.so
> -fplugin-libgccxml_plugin-xml=TestUsualInclude.xml
> ../GCC_XML/Testing/TestUsualInclude.cxx
This is analogous to the usual gccxml command:
> gccxml -fxml=TestUsualInclude.xml ../GCC_XML/Testing/TestUsualInclude.cxx
Note, both the above commands will need at least the following extra
include directories:
-IGCC_XML/GXFront -I../GCC_XML/GXFront -IGCC_XML
Cheers,
Alex
More information about the gccxml
mailing list