Akihiko Odaki <akihiko.od...@daynix.com> writes:
> This demonstrates how to write a plugin in C++. > > Signed-off-by: Akihiko Odaki <akihiko.od...@daynix.com> > --- > docs/devel/tcg-plugins.rst | 8 ++++++++ > configure | 15 ++++++++++++--- > contrib/plugins/Makefile | 5 +++++ > contrib/plugins/cc.cc | 15 +++++++++++++++ > tests/tcg/Makefile.target | 3 +++ > 5 files changed, 43 insertions(+), 3 deletions(-) > create mode 100644 contrib/plugins/cc.cc > > diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst > index c9f8b27590..0a11f8036c 100644 > --- a/docs/devel/tcg-plugins.rst > +++ b/docs/devel/tcg-plugins.rst > @@ -584,6 +584,14 @@ The plugin has a number of arguments, all of them are > optional: > configuration arguments implies ``l2=on``. > (default: N = 2097152 (2MB), B = 64, A = 16) > > +- contrib/plugins/cc.cc > + > +cc plugin demonstrates how to write a plugin in C++. It simply outputs > +"hello, world" to the plugin log:: > + > + $ qemu-system-arm $(QEMU_ARGS) \ > + -plugin ./contrib/plugins/libcc.so -d plugin > + I'm going to assume this is useful because you have some out of tree C++ plugins? I'd drop the last two patches for now until there is a slightly more compelling use case. The C++ compiler detection moved into meson in b485458e00 (configure, meson: move C++ compiler detection to meson.build) so I don't think there is currently a compelling reason to bring this back into configure. -- Alex Bennée Virtualisation Tech Lead @ Linaro