This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using plugin and lto: problem linking c-pragma symbol


Quoting Richard Guenther <richard.guenther@gmail.com>:

Iff we want to make plugins not randomly fail with -flto (which I
think we _do_ want) then it is the plugin loader machines job
to check for compatibility and either ignore (in case of lto1 maybe)
or reject (in other cases) the plugin.  So, I don't think a single MELT
plugin that works with all frontend and at the same time has access
to all frontend functions can work.  If it could then we would have
not 5 different frontend executables but a single one.

Huh? That does not follow. The access to frontend functions doesn't have to be direct. The weak function approach with wrapper and null pointer check is already mare expensive that a straight forward function call, anyway. As you stated before, the plugin can access front end functions via language hooks and/or function pointers that have been initialized with the use of dlsym. Plus, if you have all such function pointer initializations in one place, that makes a nice check-list of functionality to potentially propose for new language hooks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]