Andreas Schwab wrote:
Basile STARYNKEVITCH <[email protected]> writes:
In plugin mode (for the few plugins using PLUGIN_REGISTER_GGC_ROOTS),
gengtype needs a file list. So a plugin build (in its own directory) would
want to run (in Makefile syntax)
$(GCCBUILD)/gcc/gengtype -p $(GCCSOURCE)/gcc
$(GCCBUILD)/gcc/gtype-input.list plugin.c
However, this won't work, because the gtype-input.list contains (even when
GCC was configured with absolute paths) a few relative file paths (notably
auto-host.h).
Perhaps gengtype should be modified to always treat the files in
gtyp-input.list relative to location of that file.
If we did that, we could not run gengtype in plugin mode as easily as
[Makefile syntax inside our plugin tree]
$(GCCBUILD)/gcc/build/gengtype -p $(GCCSOURCE)/gcc
$(GCCBUILD)/gcc/gtype-input.list plugin.c
because then the plugin.c would be expected to be inside the
$(GCCBUILD)/gcc or $(GCCBUILD)/gcc/build/ directory, which it is not.
Also, modifying gengtype that way (which is non trivial: I don't know
how to *portably* and *easily* determine dynamically the location of an
executable: many non-linux systams don't have /proc/self/exe) is much
harder than just generating an extra real-gtype-input.list in
$(GCCBUILD)/gcc/
Regards
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***