[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 00 of 30] tools: shave build yaks
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |