From: Juergen Gross <jgross@suse.com>
To: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org
Cc: samuel.thibault@ens-lyon.org, Juergen Gross <jgross@suse.com>
Subject: [MINI-OS PATCH 1/2] add config support for each Xen library
Date: Mon, 7 Oct 2024 12:34:55 +0200 [thread overview]
Message-ID: <20241007103456.14946-2-jgross@suse.com> (raw)
In-Reply-To: <20241007103456.14946-1-jgross@suse.com>
Instead of adding all or no Xen library (controlled by CONFIG_XC),
support a dedicated config option for each library instead. In order
to support older Xen stubdom build versions, let CONFIG_XC enable
all CONFIG_LIBXEN options.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
Config.mk | 19 +++++++++++++++++++
Makefile | 18 +++++++++++++++++-
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/Config.mk b/Config.mk
index f2d1f0ae..d0fbacac 100644
--- a/Config.mk
+++ b/Config.mk
@@ -212,6 +212,25 @@ $(foreach i,$(CONFIG-n),$(eval $(i) ?= n))
CONFIG-x += CONFIG_LIBXS
CONFIG_LIBXS ?= $(CONFIG_XENBUS)
+CONFIG-x += CONFIG_LIBXENCALL
+CONFIG-x += CONFIG_LIBXENCTRL
+CONFIG-x += CONFIG_LIBXENDEVICEMODEL
+CONFIG-x += CONFIG_LIBXENEVTCHN
+CONFIG-x += CONFIG_LIBXENFOREIGNMEMORY
+CONFIG-x += CONFIG_LIBXENGNTTAB
+CONFIG-x += CONFIG_LIBXENGUEST
+CONFIG-x += CONFIG_LIBXENTOOLCORE
+CONFIG-x += CONFIG_LIBXENTOOLLOG
+CONFIG_LIBXENCALL ?= $(CONFIG_XC)
+CONFIG_LIBXENCTRL ?= $(CONFIG_XC)
+CONFIG_LIBXENDEVICEMODEL ?= $(CONFIG_XC)
+CONFIG_LIBXENEVTCHN ?= $(CONFIG_XC)
+CONFIG_LIBXENFOREIGNMEMORY ?= $(CONFIG_XC)
+CONFIG_LIBXENGNTTAB ?= $(CONFIG_XC)
+CONFIG_LIBXENGUEST ?= $(CONFIG_XC)
+CONFIG_LIBXENTOOLCORE ?= $(CONFIG_XC)
+CONFIG_LIBXENTOOLLOG ?= $(CONFIG_XC)
+
CONFIG-all := $(CONFIG-y) $(CONFIG-n) $(CONFIG-x)
# Export config items as compiler directives
diff --git a/Makefile b/Makefile
index 6c8df8b5..ffa8d1a8 100644
--- a/Makefile
+++ b/Makefile
@@ -123,23 +123,39 @@ endif
OBJS := $(filter-out $(OBJ_DIR)/lwip%.o $(LWO), $(OBJS))
ifeq ($(libc),y)
-ifeq ($(CONFIG_XC),y)
+ifeq ($(CONFIG_LIBXENTOOLCORE),y)
APP_LDLIBS += -L$(TOOLCORE_PATH) -whole-archive -lxentoolcore -no-whole-archive
LIBS += $(TOOLCORE_PATH)/libxentoolcore.a
+endif
+ifeq ($(CONFIG_LIBXENTOOLLOG),y)
APP_LDLIBS += -L$(TOOLLOG_PATH) -whole-archive -lxentoollog -no-whole-archive
LIBS += $(TOOLLOG_PATH)/libxentoollog.a
+endif
+ifeq ($(CONFIG_LIBXENEVTCHN),y)
APP_LDLIBS += -L$(EVTCHN_PATH) -whole-archive -lxenevtchn -no-whole-archive
LIBS += $(EVTCHN_PATH)/libxenevtchn.a
+endif
+ifeq ($(CONFIG_LIBXENGNTTAB),y)
APP_LDLIBS += -L$(GNTTAB_PATH) -whole-archive -lxengnttab -no-whole-archive
LIBS += $(GNTTAB_PATH)/libxengnttab.a
+endif
+ifeq ($(CONFIG_LIBXENCALL),y)
APP_LDLIBS += -L$(CALL_PATH) -whole-archive -lxencall -no-whole-archive
LIBS += $(CALL_PATH)/libxencall.a
+endif
+ifeq ($(CONFIG_LIBXENFOREIGNMEMORY),y)
APP_LDLIBS += -L$(FOREIGNMEMORY_PATH) -whole-archive -lxenforeignmemory -no-whole-archive
LIBS += $(FOREIGNMEMORY_PATH)/libxenforeignmemory.a
+endif
+ifeq ($(CONFIG_LIBXENDEVICEMODEL),y)
APP_LDLIBS += -L$(DEVICEMODEL_PATH) -whole-archive -lxendevicemodel -no-whole-archive
LIBS += $(DEVICEMODEL_PATH)/libxendevicemodel.a
+endif
+ifeq ($(CONFIG_LIBXENGUEST),y)
APP_LDLIBS += -L$(GUEST_PATH) -whole-archive -lxenguest -no-whole-archive
LIBS += $(GUEST_PATH)/libxenguest.a
+endif
+ifeq ($(CONFIG_LIBXENCTRL),y)
APP_LDLIBS += -L$(CTRL_PATH) -whole-archive -lxenctrl -no-whole-archive
LIBS += $(CTRL_PATH)/libxenctrl.a
endif
--
2.43.0
next prev parent reply other threads:[~2024-10-07 10:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 10:34 [MINI-OS PATCH 0/2] support individual Xen library use cases Juergen Gross
2024-10-07 10:34 ` Juergen Gross [this message]
2024-10-07 10:34 ` [MINI-OS PATCH 2/2] drop CONFIG_XC support Juergen Gross
2024-10-07 22:13 ` Samuel Thibault
2024-10-08 9:22 ` Jürgen Groß
2024-10-08 21:10 ` Samuel Thibault
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=20241007103456.14946-2-jgross@suse.com \
--to=jgross@suse.com \
--cc=minios-devel@lists.xenproject.org \
--cc=samuel.thibault@ens-lyon.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.