From: Andrew Fasano <fasano@mit.edu>
To: qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org, erdnaxe@crans.org, ma.mandourr@gmail.com,
Andrew Fasano <fasano@mit.edu>
Subject: [RFC 2/4] tcg/plugins: Automatically define CURRENT_PLUGIN
Date: Thu, 1 Sep 2022 14:27:32 -0400 [thread overview]
Message-ID: <20220901182734.2987337-3-fasano@mit.edu> (raw)
In-Reply-To: <20220901182734.2987337-1-fasano@mit.edu>
Use plugin filenames to set the preprocessor variable CURRENT_PLUGIN
as a string during plugin compilation.
Signed-off-by: Andrew Fasano <fasano@mit.edu>
---
contrib/plugins/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile
index df3499f4f2..b7720fea0f 100644
--- a/contrib/plugins/Makefile
+++ b/contrib/plugins/Makefile
@@ -34,7 +34,7 @@ CFLAGS += -I$(SRC_PATH)/include/qemu
all: $(SONAMES)
%.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(CFLAGS) -DCURRENT_PLUGIN=\"$(basename $@)\" -c -o $@ $<
lib%.so: %.o
$(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS)
--
2.34.1
next prev parent reply other threads:[~2022-09-01 21:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 18:27 [RFC 0/4] Support interactions between TCG plugins Andrew Fasano
2022-09-01 18:27 ` [RFC 1/4] docs/tcg-plugins: describe QPP API Andrew Fasano
2022-09-21 13:57 ` Alex Bennée
2022-09-01 18:27 ` Andrew Fasano [this message]
2022-09-21 14:00 ` [RFC 2/4] tcg/plugins: Automatically define CURRENT_PLUGIN Alex Bennée
2022-09-26 21:37 ` Andrew S. Fasano
2022-09-01 18:27 ` [RFC 3/4] tcg/plugins: Support for inter-plugin interactions Andrew Fasano
2022-09-21 14:51 ` Alex Bennée
2022-09-26 21:37 ` Andrew S. Fasano
2022-09-01 18:27 ` [RFC 4/4] tcg/plugins: Add example pair of QPP plugins Andrew Fasano
2022-09-21 15:22 ` Alex Bennée
2022-09-26 21:38 ` Andrew S. Fasano
2022-09-21 15:36 ` Alex Bennée
2022-09-26 21:38 ` Andrew S. Fasano
2022-09-21 12:13 ` [RFC 0/4] Support interactions between TCG plugins Alex Bennée
2022-09-26 21:36 ` Andrew S. Fasano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220901182734.2987337-3-fasano@mit.edu \
--to=fasano@mit.edu \
--cc=alex.bennee@linaro.org \
--cc=erdnaxe@crans.org \
--cc=ma.mandourr@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).