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

Boris Kolpackov boris at codesynthesis.com
Wed Mar 6 06:32:10 EST 2013


Hi Hugo,

Hugo.Mildenberger at web.de <Hugo.Mildenberger at web.de> writes:

> Which still does not prevent you from installing the plugin right there.

Yes, but GCC 4.5 won't be able to find it if ODB uses the short plugin
name. The whole idea is to have a single /usr/bin/odb and multiple
plugins, one for each GCC version. By using the short plugin name,
/usr/bin/odb will cause GCC to load the correct plugin automatically.


> 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.

That's way too messy. It would also mean that in order to support GCC 4.5
one would need to install /usr/bin/odb that was built with GCC 4.5.

Probably a better approach would be for /usr/bin/odb to first check if
a GCC-specific version of the plugin was installed (i.e., run GCC with
-print-file-name=plugin and stat() odb.so in that directory). If one
exists, then pass that using absolute plugin path (so that it works
with GCC 4.5).


> 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.

The point I am trying to make is that it is the host GCC (as opposed
to target GCC) that needs to be built with plugin support. And we can't
do any runtime checks with host GCC since we cannot run it.

Boris



More information about the odb-users mailing list