libxc: build fixes
PATCH 1/1 libxc: build fixes
Hi!
Attached patch makes libxc build again on NetBSD after the recent rework.
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
config/Linux.mk +2 -0
@@ -6,3 +6,5 @@ KERNELS ?= XKERNELS := $(foreach kernel, $(KERNELS), \ $(patsubst buildconfigs/mk.%,%, \ $(wildcard buildconfigs/mk.$(kernel))) ) + +LIBDL = -ldl
config/NetBSD.mk +2 -0
@@ -7,6 +7,8 @@ LIBLEAFDIR_x86_64 = lib LIBEXEC = $(PREFIX)/libexec PRIVATE_BINDIR = $(BINDIR) +LIBDL = + ifeq ($(PREFIX),/usr) XEN_LOCK_DIR = /var/lib else
tools/libxc/Makefile +1 -1
@@ -158,7 +158,7 @@ libxenctrl.so.$(MAJOR): libxenctrl.so.$( ln -sf $< $@ libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) -ldl $(SHLIB_LDFLAGS) -o $@ $^ $(PTHREAD_LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(LIBDL) $(SHLIB_LDFLAGS) -o $@ $^ $(PTHREAD_LIBS) # libxenguest
tools/libxc/xc_netbsd.c +2 -2
@@ -52,7 +52,7 @@ static xc_osdep_handle netbsd_privcmd_op goto error; } -return (xc_osinteface_handle )fd; +return (xc_osdep_handle )fd; error: saved_errno = errno;
@@ -182,7 +182,7 @@ static struct xc_osdep_ops netbsd_privcm .close = &netbsd_privcmd_close, .u.privcmd = { - .hypercall = &netbsd_privcmd_hypercall; + .hypercall = &netbsd_privcmd_hypercall, .map_foreign_batch = &netbsd_privcmd_map_foreign_batch, .map_foreign_bulk = &xc_map_foreign_bulk_compat,
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Christoph Egger writes ("[Xen-devel] [PATCH] libxc: build fixes"):
Quoted 1 line
Attached patch makes libxc build again on NetBSD after the recent rework.
I have applied this. However:
I changed the name of the new make variable from LIBDL to DLOPEN_LIBS. The latter conforms to the naming scheme for similar variables found in config/*.mk - PTHREAD_LIBS et al.
Also I moved the setting of the variable to -dl from Linux to StdGNU (which makes it apply more widely) and also added it to SunOS.mk (based on pure guesswork).
Ian.
Quoted 5 lines · Christoph Egger
Hi!
Attached patch makes libxc build again on NetBSD after the recent rework.
Signed-off-by Christoph Egger <[email protected]>
Sorry for the breakage.
IanJ has already applied this (or I'd have acked it) but it did remind me that I've been meaning to ask if you happen to have a reliable recipe for installing a NetBSD domU on a Linux dom0, so I can at least compile test this sort of thing.
My attempts to do so in the past have not been terribly successful. I think because the HOWTOs I find via google tend to assume a NetBSD dom0 as well or be out of date. Maybe I should just try again, it has been a while...
Ian.
Quoted 5 lines · Ian Jackson
Christoph Egger writes ("[Xen-devel] [PATCH] libxc: build fixes"):
Quoted 1 line
Attached patch makes libxc build again on NetBSD after the recent rework.
I have applied this. However:
Quoted 7 lines
I changed the name of the new make variable from LIBDL to
DLOPEN_LIBS. The latter conforms to the naming scheme for similar variables found in config/*.mk -PTHREAD_LIBSet al.Also I moved the setting of the variable to -dl from Linux to StdGNU (which makes it apply more widely) and also added it to SunOS.mk (based on pure guesswork).
This is incomplete. flask does not build because linking fails with missing dlopen/dlsym etc. This change fixes it for me.
tools/Rules.mk +1 -1
@@ -18,7 +18,7 @@ XEN_BLKTAP2 = $(XEN_ROOT)/tools/b CFLAGS_include = -I$(XEN_INCLUDE) CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_include) -LDLIBS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl +LDLIBS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl $(DLOPEN_LIBS) CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_include) LDLIBS_libxenguest = -L$(XEN_LIBXC) -lxenguest
Ian Campbell
Acked-byQuoted 11 lines · Olaf Hering
Quoted 9 lines · Ian Jackson
Christoph Egger writes ("[Xen-devel] [PATCH] libxc: build fixes"):
Quoted 1 line
Attached patch makes libxc build again on NetBSD after the recent rework.
I have applied this. However:
I changed the name of the new make variable from LIBDL to
DLOPEN_LIBS. The latter conforms to the naming scheme for similar variables found in config/*.mk -PTHREAD_LIBSet al.
Quoted 6 lines
Quoted 3 lines
Also I moved the setting of the variable to -dl from Linux to StdGNU (which makes it apply more widely) and also added it to SunOS.mk (based on pure guesswork).
This is incomplete. flask does not build because linking fails with missing dlopen/dlsym etc. This change fixes it for me.
I thought there was a way to convince ld to do this sort of thing automatically without forcing higher layers to know all about the transitive dependencies.
However we've got a bunch of this stuff already and I don't think anyone really wants to go messing with the build system so close to the 4.1-rc0 anyway so:
Quoted 1 line
Signed-off-by Olaf Hering <[email protected]>
Ian.
Quoted 17 lines
tools/Rules.mk +1
-1@@ -18,7 +18,7 @@ XEN_BLKTAP2 = $(XEN_ROOT)/tools/b CFLAGS_include = -I$(XEN_INCLUDE) CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_include) -LDLIBS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl +LDLIBS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl $(DLOPEN_LIBS) CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_include) LDLIBS_libxenguest = -L$(XEN_LIBXC) -lxenguest_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Ian Campbell writes ("Re: [Xen-devel] [PATCH] libxc: build fixes"):
Quoted 3 lines · Olaf Hering
Quoted 2 lines
This is incomplete. flask does not build because linking fails with missing dlopen/dlsym etc. This change fixes it for me.
Thanks for the report. I see Keir has applied this patch.
Quoted 3 lines
I thought there was a way to convince ld to do this sort of thing automatically without forcing higher layers to know all about the transitive dependencies.
Not really. The closest thing is pkg-config. libtool has something which tries to do this bug libtool is the work of the devil.
Quoted 3 lines
However we've got a bunch of this stuff already and I don't think anyone really wants to go messing with the build system so close to the 4.1-rc0 anyway so:
Certainly, that too :-).
Ian.