This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Does gengtyped gt-*.h depends upon the configuration of the compiler?
- From: Basile Starynkevitch <basile at starynkevitch dot net>
- To: gcc at gcc dot gnu dot org
- Cc: Sylvestre Ledru <sylvestre at debian dot org>
- Date: Wed, 10 Mar 2010 23:36:18 +0100
- Subject: Does gengtyped gt-*.h depends upon the configuration of the compiler?
Hello All,
Sylvestre Ledru is very nicely trying to package MELT as a packaged
debian plugin for GCC 4.5 - MELT can be compiled either as an entire GCC
branch, or as a GCC 4.5 -i.e. trunk- plugin.
However, we seems to have found some difficult issue. As Diego added
into the documentation:
http://gcc.gnu.org/onlinedocs/gccint/Plugins.html#Plugins
"Plugins needing to use gengtype require a GCC build directory for the
same version of GCC that they will be linked against."
The MELT plugin uses PLUGIN_REGISTER_GGC_ROOTS et PLUGIN_GGC_MARKING
So it needs to run gengtype to generate the GGC roots table specific to
MELT. MELT also have its own GTY-ed struct in melt-runtime.h & some
GTY-ed roots in melt-runtime.c
MELT only need gengtype to generate its gt-melt-runtime.h but I have no
idea if that file depends upon the configuration (and notably the target
for which GCC is built). The GTY-ed data of MELT does not depend (IMHO)
upon the configuration directly (in the sense that there is no #ifdef
around GTY-ed struct), but of course it points to data like Gimple or
Tree which I imagine depend upon the configuration of GCC (notably
--enable-check but perhaps also the target ...)
In other words, would a gt-melt-runtime.h generated on
Debian/Linux/AMD64 would be ok for a Debian/Linux/x86 or
Debian/Linux/ARM? I blindly guess that probably not, but I am not sure.
Apparently, the constraint that gengtype requires availability of both
the source & the build trees of the GCC for which the plugin is built is
quite unnatural (but of course I understand why it is needed) and could
be perhaps incompatible with the way many Linux distributions (including
Debian) are naturally packaging GCC.
Comments are welcome.
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} ***