WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] build: link to specific library version (libxs, libx

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] build: link to specific library version (libxs, libxl, xenstore, xenstat)
From: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
Date: Thu, 06 Oct 2011 14:16:57 +0200
Cc: Ian.Campbell@xxxxxxxxxxxxx
Delivery-date: Thu, 06 Oct 2011 05:18:17 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:content-type:mime-version:content-transfer-encoding:subject :x-mercurial-node:message-id:in-reply-to:references:user-agent:date :from:to:cc; bh=jhMHgLZXkoXvfXLY1QhRqdv7Yx+Moo2IFpuKI28+32I=; b=BwTUgNIjxZfOtKf/iTaQzfcmMJy9HHSSCh+kac/FultE6BsjJSs+YifCIq4yDZW2wt C1oamrHRnqvFRvkMKw7VBcf8bgw7U4oKY8nYIogvo2sx8JcW/ybu6DZju/a+FKHApeUx h9lW9r6iQRpq364MAwo6DfGe1gszV9BE0AOto=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1317901600.21903.230.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1317901600.21903.230.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.9.2
# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
# Date 1317903332 -7200
# Node ID 25d25990dd1b0f1e26d8dd56c45b9daf377969b9
# Parent  a88029177dbcea6863a9c4e8e0cee81b08ecaed4
build: link to specific library version (libxs, libxl, xenstore, xenstat)

To avoid linking to an older version of xen libraries when compiling with 
LDFLAGS and CFLAGS set, explicitly pass the linker the library file to link to.

Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>

diff -r a88029177dbc -r 25d25990dd1b tools/Rules.mk
--- a/tools/Rules.mk    Fri Sep 30 14:27:58 2011 +0100
+++ b/tools/Rules.mk    Thu Oct 06 14:15:32 2011 +0200
@@ -18,19 +18,19 @@ XEN_BLKTAP2        = $(XEN_ROOT)/tools/b
 CFLAGS_xeninclude = -I$(XEN_INCLUDE)
 
 CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_xeninclude)
-LDLIBS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl
+LDLIBS_libxenctrl = $(XEN_LIBXC)/libxenctrl.so
 SHLIB_libxenctrl  = -Wl,-rpath-link=$(XEN_LIBXC)
 
 CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_xeninclude)
-LDLIBS_libxenguest = -L$(XEN_LIBXC) -lxenguest
+LDLIBS_libxenguest = $(XEN_LIBXC)/libxenguest.so
 SHLIB_libxenguest  = -Wl,-rpath-link=L$(XEN_LIBXC)
 
 CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_xeninclude)
-LDLIBS_libxenstore = -L$(XEN_XENSTORE) -lxenstore
+LDLIBS_libxenstore = $(XEN_XENSTORE)/libxenstore.so
 SHLIB_libxenstore  = -Wl,-rpath-link=$(XEN_XENSTORE)
 
 CFLAGS_libxenstat  = -I$(XEN_LIBXENSTAT)
-LDLIBS_libxenstat  = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) 
-L$(XEN_LIBXENSTAT) -lxenstat
+LDLIBS_libxenstat  = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) 
$(XEN_LIBXENSTAT)/libxenstat.so
 SHLIB_libxenstat  = -Wl,-rpath-link=$(XEN_LIBXENSTAT)
 
 ifeq ($(CONFIG_Linux),y)
@@ -50,7 +50,7 @@ SHLIB_libblktapctl  =
 endif
 
 CFLAGS_libxenlight = -I$(XEN_XENLIGHT) $(CFLAGS_libxenctrl) 
$(CFLAGS_xeninclude)
-LDLIBS_libxenlight = -L$(XEN_XENLIGHT) $(SHLIB_libxenctrl) 
$(SHLIB_libxenstore) $(SHLIB_libblktapctl) -lxenlight
+LDLIBS_libxenlight = $(XEN_XENLIGHT)/libxenlight.so $(SHLIB_libxenctrl) 
$(SHLIB_libxenstore) $(SHLIB_libblktapctl)
 SHLIB_libxenlight  = -Wl,-rpath-link=$(XEN_XENLIGHT)
 
 CFLAGS += -D__XEN_TOOLS__

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