Skip to contentSkip to conversation

qemu-trad: remove Xen path dependencies

PATCH In review Juergen Gross 2 participants 3 messages Jul 15, 2020 – Aug 18, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-trad: remove Xen path dependencies

xen-hhoks.mak contains hard wired paths for the used libraries of qemu-trad. Replace those by the make variables from Xen's Rules.mk, which is already included.

This in turn removes the need to add the runtime link paths of the libraries the directly used libraries depend on.

---
 xen-hooks.mak | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)
xen-hooks.mak +4 -14
index a68eba3c..2689db0f 100644
@@ -1,10 +1,8 @@
-CPPFLAGS+= -I$(XEN_ROOT)/tools/libs/toollog/include
-CPPFLAGS+= -I$(XEN_ROOT)/tools/libs/evtchn/include
-CPPFLAGS+= -I$(XEN_ROOT)/tools/libs/gnttab/include
+XEN_LIBS = evtchn gnttab ctrl guest store
+
 CPPFLAGS+= -DXC_WANT_COMPAT_MAP_FOREIGN_API
 CPPFLAGS+= -DXC_WANT_COMPAT_DEVICEMODEL_API
-CPPFLAGS+= -I$(XEN_ROOT)/tools/libxc/include
-CPPFLAGS+= -I$(XEN_ROOT)/tools/xenstore/include
+CPPFLAGS += $(foreach lib,$(XEN_LIBS),$(CFLAGS_libxen$(lib)))
 CPPFLAGS+= -I$(XEN_ROOT)/tools/include
 
 SSE2 := $(call cc-option,-msse2,)
@@ -22,15 +20,7 @@ endif
 
 CFLAGS += $(CMDLINE_CFLAGS)
 
-LIBS += -L$(XEN_ROOT)/tools/libs/evtchn -lxenevtchn
-LIBS += -L$(XEN_ROOT)/tools/libs/gnttab -lxengnttab
-LIBS += -L$(XEN_ROOT)/tools/libxc -lxenctrl -lxenguest
-LIBS += -L$(XEN_ROOT)/tools/xenstore -lxenstore
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/toollog
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/toolcore
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/call
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/foreignmemory
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/devicemodel
+LIBS += $(foreach lib,$(XEN_LIBS),$(LDLIBS_libxen$(lib)))
 
 LDFLAGS := $(CFLAGS) $(LDFLAGS)
 
Signature · 1 line
2.26.2
#1 lore raw
Quoted 8 lines · Juergen Gross

xen-hhoks.mak contains hard wired paths for the used libraries of qemu-trad. Replace those by the make variables from Xen's Rules.mk, which is already included.

This in turn removes the need to add the runtime link paths of the libraries the directly used libraries depend on.

Ping?

Juergen

Quoted 40 lines
---
  xen-hooks.mak | 18 ++++--------------
  1 file changed, 4 insertions(+), 14 deletions(-)
xen-hooks.mak +4 -14
index a68eba3c..2689db0f 100644
@@ -1,10 +1,8 @@
-CPPFLAGS+= -I$(XEN_ROOT)/tools/libs/toollog/include
-CPPFLAGS+= -I$(XEN_ROOT)/tools/libs/evtchn/include
-CPPFLAGS+= -I$(XEN_ROOT)/tools/libs/gnttab/include
+XEN_LIBS = evtchn gnttab ctrl guest store
+
  CPPFLAGS+= -DXC_WANT_COMPAT_MAP_FOREIGN_API
  CPPFLAGS+= -DXC_WANT_COMPAT_DEVICEMODEL_API
-CPPFLAGS+= -I$(XEN_ROOT)/tools/libxc/include
-CPPFLAGS+= -I$(XEN_ROOT)/tools/xenstore/include
+CPPFLAGS += $(foreach lib,$(XEN_LIBS),$(CFLAGS_libxen$(lib)))
  CPPFLAGS+= -I$(XEN_ROOT)/tools/include
 
  SSE2 := $(call cc-option,-msse2,)
@@ -22,15 +20,7 @@ endif
 
  CFLAGS += $(CMDLINE_CFLAGS)
 
-LIBS += -L$(XEN_ROOT)/tools/libs/evtchn -lxenevtchn
-LIBS += -L$(XEN_ROOT)/tools/libs/gnttab -lxengnttab
-LIBS += -L$(XEN_ROOT)/tools/libxc -lxenctrl -lxenguest
-LIBS += -L$(XEN_ROOT)/tools/xenstore -lxenstore
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/toollog
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/toolcore
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/call
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/foreignmemory
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/devicemodel
+LIBS += $(foreach lib,$(XEN_LIBS),$(LDLIBS_libxen$(lib)))
 
  LDFLAGS := $(CFLAGS) $(LDFLAGS)
 
Reviewed-by
#2 lore raw

Jürgen Groß writes ("Re: [PATCH] qemu-trad: remove Xen path dependencies"):

Quoted 11 lines · Juergen Gross
Quoted 8 lines

xen-hhoks.mak contains hard wired paths for the used libraries of qemu-trad. Replace those by the make variables from Xen's Rules.mk, which is already included.

This in turn removes the need to add the runtime link paths of the libraries the directly used libraries depend on.

Ping?