All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxc: build fixes
@ 2011-01-06 15:46 Christoph Egger
  2011-01-06 17:27 ` Ian Jackson
  2011-01-06 17:42 ` Ian Campbell
  0 siblings, 2 replies; 6+ messages in thread
From: Christoph Egger @ 2011-01-06 15:46 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]


Hi!

Attached patch makes libxc build again on NetBSD after the recent rework.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

-- 
---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

[-- Attachment #2: xen_libxc_build.diff --]
[-- Type: text/x-diff, Size: 1729 bytes --]

diff -r 45d657ffba3f -r bfe60252cca5 config/Linux.mk
--- a/config/Linux.mk
+++ b/config/Linux.mk
@@ -6,3 +6,5 @@ KERNELS ?=
 XKERNELS := $(foreach kernel, $(KERNELS), \
               $(patsubst buildconfigs/mk.%,%, \
                 $(wildcard buildconfigs/mk.$(kernel))) )
+
+LIBDL = -ldl
diff -r 45d657ffba3f -r bfe60252cca5 config/NetBSD.mk
--- a/config/NetBSD.mk
+++ b/config/NetBSD.mk
@@ -7,6 +7,8 @@ LIBLEAFDIR_x86_64 = lib
 LIBEXEC = $(PREFIX)/libexec
 PRIVATE_BINDIR = $(BINDIR)
 
+LIBDL =
+
 ifeq ($(PREFIX),/usr)
 XEN_LOCK_DIR = /var/lib
 else
diff -r 45d657ffba3f -r bfe60252cca5 tools/libxc/Makefile
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -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
 
diff -r 45d657ffba3f -r bfe60252cca5 tools/libxc/xc_netbsd.c
--- a/tools/libxc/xc_netbsd.c
+++ b/tools/libxc/xc_netbsd.c
@@ -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,

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libxc: build fixes
  2011-01-06 15:46 [PATCH] libxc: build fixes Christoph Egger
@ 2011-01-06 17:27 ` Ian Jackson
  2011-01-11 10:41   ` Olaf Hering
  2011-01-06 17:42 ` Ian Campbell
  1 sibling, 1 reply; 6+ messages in thread
From: Ian Jackson @ 2011-01-06 17:27 UTC (permalink / raw)
  To: Christoph Egger; +Cc: xen-devel

Christoph Egger writes ("[Xen-devel] [PATCH] libxc: build fixes"):
> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libxc: build fixes
  2011-01-06 15:46 [PATCH] libxc: build fixes Christoph Egger
  2011-01-06 17:27 ` Ian Jackson
@ 2011-01-06 17:42 ` Ian Campbell
  1 sibling, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2011-01-06 17:42 UTC (permalink / raw)
  To: Christoph Egger; +Cc: xen-devel

On Thu, 2011-01-06 at 15:46 +0000, Christoph Egger wrote:
> Hi!
> 
> Attached patch makes libxc build again on NetBSD after the recent rework.
> 
> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libxc: build fixes
  2011-01-06 17:27 ` Ian Jackson
@ 2011-01-11 10:41   ` Olaf Hering
  2011-01-11 12:46     ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2011-01-11 10:41 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Christoph Egger, xen-devel

On Thu, Jan 06, Ian Jackson wrote:

> Christoph Egger writes ("[Xen-devel] [PATCH] libxc: build fixes"):
> > 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).

This is incomplete. flask does not build because linking fails with
missing dlopen/dlsym etc. This change fixes it for me.


Signed-off-by: Olaf Hering <olaf@aepfle.de>
 
--- xen-unstable.hg-4.1.22697.orig/tools/Rules.mk
+++ xen-unstable.hg-4.1.22697/tools/Rules.mk
@@ -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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libxc: build fixes
  2011-01-11 10:41   ` Olaf Hering
@ 2011-01-11 12:46     ` Ian Campbell
  2011-01-11 18:46       ` Ian Jackson
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2011-01-11 12:46 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Christoph Egger, xen-devel, Ian Jackson

On Tue, 2011-01-11 at 10:41 +0000, Olaf Hering wrote:
> On Thu, Jan 06, Ian Jackson wrote:
> 
> > Christoph Egger writes ("[Xen-devel] [PATCH] libxc: build fixes"):
> > > 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).
> 
> 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:

> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>

Ian.

>  
> --- xen-unstable.hg-4.1.22697.orig/tools/Rules.mk
> +++ xen-unstable.hg-4.1.22697/tools/Rules.mk
> @@ -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
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libxc: build fixes
  2011-01-11 12:46     ` Ian Campbell
@ 2011-01-11 18:46       ` Ian Jackson
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Jackson @ 2011-01-11 18:46 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Olaf Hering, xen-devel, Christoph Egger

Ian Campbell writes ("Re: [Xen-devel] [PATCH] libxc: build fixes"):
> On Tue, 2011-01-11 at 10:41 +0000, Olaf Hering wrote:
> > 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.

> 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.

> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-01-11 18:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-06 15:46 [PATCH] libxc: build fixes Christoph Egger
2011-01-06 17:27 ` Ian Jackson
2011-01-11 10:41   ` Olaf Hering
2011-01-11 12:46     ` Ian Campbell
2011-01-11 18:46       ` Ian Jackson
2011-01-06 17:42 ` Ian Campbell

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.