This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: instructions for compiling plugins?
- From: Rafael Espindola <espindola at google dot com>
- To: Basile STARYNKEVITCH <basile at starynkevitch dot net>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Tue, 16 Jun 2009 12:47:56 +0100
- Subject: Re: instructions for compiling plugins?
- References: <4A375729.8020707@starynkevitch.net>
> Apparently, the goal is to be able to compile (at least some) plugins
> without having the GCC source tree or build tree.
Correct.
> However, I believe we don't have any documentation stating that. At least
> not in http://gcc.gnu.org/onlinedocs/gccint/Plugins.html and not in
> http://gcc.gnu.org/wiki/plugins
>
> My feeling is that, at least on Linux machines, a plugin might be compiled
> with e.g. a Makefile containing
>
> GCC=gcc-trunk
> GCCPLUGINS_DIR:=$(shell $(GCC) -print-file-name=plugin)
> CFLAGS+= -I$(GCCPLUGINS_DIR)/include -fPIC
>
> plugin.so: plugin.pic.o
> Â $(GCC) -shared $^ -o $@
>
> plugin.pic.o: plugin.c
Something like that :-)
> Should we add a section "Building plugins" in the Plugin chapter of the
> documentation http://gcc.gnu.org/onlinedocs/gccint/Plugins.html ?
>
>
> By the way, are we sure that install-plugin target in gcc/Makefile is
> invoked from a toplevel sudo make install in the build dir? I feel it might
> not be the case, but I am not sure..
I tried a "make install" from the top level builddir and the headers
were installed correctly.
> Regards.
>
> --
> Basile STARYNKEVITCH Â Â Â Â http://starynkevitch.net/Basile/
Cheers,
--
Rafael Avila de Espindola
Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047