[odb-users] odb-2.2.1 should install the odb.so plugin into $(gcc -print-file-name=plugin)

Hugo.Mildenberger at web.de Hugo.Mildenberger at web.de
Tue Mar 5 10:22:40 EST 2013


Hi Boris,

  On Tue, 5 Mar 2013 16:13:51 +0200
  Boris Kolpackov <boris at codesynthesis.com> wrote:
  > In GCC 4.5 this is the path where the plugin headers are installed (in
  > the include/ subdirectory). The code to load plugins from this directory
  > is just not there in GCC 4.5 (see gcc/plugin.c).

Which still does not prevent you from installing the plugin right there. ODB currently does not use GCC's internal knowledge concerning its own plugin path. So, if the first attempt fails for the reason of a non-existant plugin, one could issue a notice and run gcc without specifying the plugin path. The first attempt would always be the GCC plugin path of the GCC version ODB itself was compiled with.
 
  > Good point. If cross-compiling, we may not even be able to run host
  > GCC to detect any paths, including the plugin path (i.e.,
  > -print-file-name=plugin). This complicates things significantly.
  > Perhaps we should keep it simple and just provide an option that
  > can be used to specify the alternative plugin installation directory.

Yes, I see it now. 

  > In fact, even with plugin headers, strictly speaking, things are broken
  > right now because we use build GCC (which may not even be built with
  > plugin support) instead of host GCC.

If gcc was built without plugin support, does -print-file-name=plugin result in an error condition? If so, one could base a run-time test on it, finally covering all cases. Else it's a GCC bug.

Hugo



More information about the odb-users mailing list