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

Re: [Xen-devel] [PATCH 00 of 30] tools: shave build yaks

To: Olaf Hering <olaf@xxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 00 of 30] tools: shave build yaks
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Wed, 23 Mar 2011 16:57:31 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 23 Mar 2011 10:21:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110323161544.GA23640@xxxxxxxxx>
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>
Organization: Citrix Systems, Inc.
References: <patchbomb.1300718663@xxxxxxxxxxxxxxxxxxxxx> <20110323161544.GA23640@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2011-03-23 at 16:15 +0000, Olaf Hering wrote:
> On Mon, Mar 21, Ian Campbell wrote:
> 
> > Clean up a bunch of inconsistency, wierdness, cut-and-paste etc in the
> > tools/ build system. All in all it's a bit of a grab bag of stuff I
> > happened to notice as I was trawling 
> > 
> > One specific useful thing which comes out of it is to isolate users of
> > libxl from needing to know about libxenstore or libxenctrl.
> 
> Ian,
> 
> from a quick look its not clear which patch between changeset 23062 and
> 23082 causes a link failure in libxenstat.
> Appending -fPIC to the CFLAGS in tools/xenstat/libxenstat/Makefile
> fixed this failure for me:
> 
> /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld:
> src/xenstat.o: relocation R_X86_64_32S against `.rodata' can not be used
> when making a shared object; recompile with -fPIC

Sorry, I should have compile tested 64 bit and I forgot.

In theory we should compile to .opic as well as .o files and use them
for the .so and the .a respectively. However I'm not sure we care much
about the PIC overhead in the .a version of a library such as this so I
think simply adding the -fPIC is ok.

8<-----------------------------------------------

# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1300899163 0
# Node ID 7b4578c97a8f51f566595a269018f786cfeeb22b
# Parent  d7d3aabffa1b70955ba347cfbe3869b9461374ee
tools/xenstat: 23075:b4351d57464b added libxenstat.so but didn't build fPIC

This broke on x86_64.

Reported by Olaf Hering

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r d7d3aabffa1b -r 7b4578c97a8f tools/xenstat/libxenstat/Makefile
--- a/tools/xenstat/libxenstat/Makefile Wed Mar 23 16:44:47 2011 +0000
+++ b/tools/xenstat/libxenstat/Makefile Wed Mar 23 16:52:43 2011 +0000
@@ -36,6 +36,7 @@ SONAME_FLAGS=-Wl,$(SONAME_LDFLAG) -Wl,li
 
 WARN_FLAGS=-Wall -Werror
 
+CFLAGS+=-fPIC
 CFLAGS+=-Isrc $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(CFLAGS_xeninclude)
 
 LDLIBS-y = $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl)



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