Message ID | CAF+LTecLdmPHK9J6uc-iROE8zELyp0+Qmf0nTiYg=UwGP-6i7g@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Thu, 21 Jul 2011 10:03:22 +0200 Romain Geissler <romain.geissler@gmail.com> wrote: > Hi, > > I added a few includes i need to define some new primitives. > > Basile, i included two "c-family/*.h" files, but be aware that currently > GCC does not install this headers in the c-family directory but in the > directly in the plugin/include root directory with all other headers. I posted > a patch some times ago to solve that (because it breaks includes of > C++ plugin headers) for the trunk. Unfortunately, the patch hasn't been > reviewed yet. See > http://old.nabble.com/-PLUGIN--c-family-files-installation-td32038394.html > Once again, Debian maintainers applied a similar patch for a long time > and thus theses files are in the c-family directory (but only for Debian > users). > > So i don't know if you should apply the patch as is or remove > the "c-family/" prefix in the includes. > > Romain Geissler > > gcc/ > > 2011-07-21 Romain Geissler <romain.geissler@gmail.com> > > * melt-run.proto.h: Include "c-family/c-pragma.h", > "c-family/c-pretty-print.h", "cpplib.h" and "langhooks.h". > Actually, we have the same issue in melt-runtime.c, which has #include "c-pragma.h" And I want badly MELT to be compilable as a plugin to an umodified gcc-4.6-plugin-dev package on Debian. I don't understand if it is an issue related to building GCC & its plugin with C++, or it is an issue with 4.7 ? I am tempted to put in melt-runtime.c something like /* Headers from c-family/ should be included directly with GCC4.6, but not with GCC 4.7 or when compiling with a C++ compiler. */ #if defined(GCCPLUGIN_VERSION) || MELT_GCC_VERSION>4006 || defined(__cplusplus) #include "c-family/c-pragma.h" #else #include "c-pragma.h" #endif And likewise in melt-run.proto.h What do you think? (I really want the MELT plugin to be compilable on an installed gcc-4.6!) Cheers
2011/7/21 Basile Starynkevitch <basile@starynkevitch.net>: > And I want badly MELT to be compilable as a plugin to an umodified gcc-4.6-plugin-dev > package on Debian. > > I don't understand if it is an issue related to building GCC & its plugin with C++, or > it is an issue with 4.7 ? > > I am tempted to put in melt-runtime.c something like > > /* Headers from c-family/ should be included directly with GCC4.6, but not with GCC 4.7 > or when compiling with a C++ compiler. */ > #if defined(GCCPLUGIN_VERSION) || MELT_GCC_VERSION>4006 || defined(__cplusplus) > #include "c-family/c-pragma.h" > #else > #include "c-pragma.h" > #endif > > And likewise in melt-run.proto.h > > What do you think? (I really want the MELT plugin to be compilable on an installed > gcc-4.6!) This will work for all case (iff my patch for the trunk is applied some day !)
I have just updated to the latest svn revision, and it seems you forgot to #include cpplib.h and langhooks.h. Note about the c-family issue, you will be allowed to apply it (in the trunk, and then in the melt branch) in 24 hours unless the plugin maintainer block this one. I can't do it by myself as i don't have write access to the svn repo. See Joseph S. Myers post at http://old.nabble.com/-PLUGIN--c-family-files-installation-td32038394.html Romain Geissler
On Thu, 21 Jul 2011 17:32:40 +0200 Romain Geissler <romain.geissler@gmail.com> wrote: > I have just updated to the latest svn revision, and it seems you > forgot to #include cpplib.h and langhooks.h. Done. Committed revision 176577 of the MELT branch. Thanks for spotting my mistake.
Index: gcc/melt-run.proto.h =================================================================== --- gcc/melt-run.proto.h (revision 176395) +++ gcc/melt-run.proto.h (working copy) @@ -52,6 +52,8 @@ along with GCC; see the file COPYING3. #include "timevar.h" #include "ggc.h" #include "cgraph.h" +#include "c-family/c-pragma.h" +#include "c-family/c-pretty-print.h" #include "diagnostic.h" #include "flags.h" #include "toplev.h" @@ -61,6 +63,8 @@ along with GCC; see the file COPYING3. #include "prefix.h" #include "md5.h" #include "cppdefault.h" +#include "cpplib.h" +#include "langhooks.h" /* MELT specific includes */