From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 5 of 5] libxl: fix link issue on uclibc when using yajl Date: Mon, 19 Dec 2011 09:54:49 +0000 Message-ID: <1324288489.9236.9.camel@zakaz.uk.xensource.com> References: <6780cbdfa64b148b0c37.1324212505@alpine.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <6780cbdfa64b148b0c37.1324212505@alpine.localdomain> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Roger Pau Monne Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Sun, 2011-12-18 at 12:48 +0000, Roger Pau Monne wrote: > # HG changeset patch > # User Roger Pau Monne > # Date 1324171782 -3600 > # Node ID 6780cbdfa64b148b0c372a4f82448f707ad2be59 > # Parent 7bcb3a61ce8846f8e7834d14c460c0f4b4869222 > libxl: fix link issue on uclibc when using yajl > > yajl makes use of the isnan isinf functions. On Glibc, these are > provided by libc, but on uClibc you need to link with -lm (like the > spec says), so ensure we do so. If libyajl needs those symbols then it should link against libm itself and not rely ion the application to do so. There should be no need for an application using liyajl to do this itself when linking dynamically. I suspect this is a bug in libyajl. (if adding -lm were correct then it would be better to just do it unconditionally) Ian. > > Signed-off-by: Roger Pau Monne > > diff -r 7bcb3a61ce88 -r 6780cbdfa64b tools/libxl/Makefile > --- a/tools/libxl/Makefile Sun Dec 18 02:29:42 2011 +0100 > +++ b/tools/libxl/Makefile Sun Dec 18 02:29:42 2011 +0100 > @@ -24,6 +24,10 @@ LIBXL_LIBS = $(LDLIBS_libxenctrl) $(LDLI > > LIBXLU_LIBS = > > +XL_LIBS = > + > +TESTIDL_LIBS = > + > LIBXL_OBJS-y = osdeps.o libxl_paths.o libxl_bootloader.o flexarray.o > ifeq ($(LIBXL_BLKTAP),y) > LIBXL_OBJS-y += libxl_blktap2.o > @@ -35,6 +39,12 @@ LIBXL_OBJS-$(CONFIG_IA64) += libxl_nocpu > > LIBXL_LIBS += -lyajl > > +ifeq ($(CONFIG_UCLIBC),y) > +LIBXL_LIBS += -lm > +XL_LIBS += -lm > +TESTIDL_LIBS += -lm > +endif > + > LIBXL_OBJS = flexarray.o libxl.o libxl_create.o libxl_dm.o libxl_pci.o \ > libxl_dom.o libxl_exec.o libxl_xshelp.o libxl_device.o \ > libxl_internal.o libxl_utils.o libxl_uuid.o libxl_json.o \ > @@ -127,10 +137,10 @@ libxlutil.a: $(LIBXLU_OBJS) > $(AR) rcs libxlutil.a $^ > > xl: $(XL_OBJS) libxlutil.so libxenlight.so > - $(CC) $(LDFLAGS) -o $@ $(XL_OBJS) libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS) > + $(CC) $(LDFLAGS) -o $@ $(XL_OBJS) libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) $(XL_LIBS) $(APPEND_LDFLAGS) > > testidl: testidl.o libxlutil.so libxenlight.so > - $(CC) $(LDFLAGS) -o $@ testidl.o libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS) > + $(CC) $(LDFLAGS) -o $@ testidl.o libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) $(TESTIDL_LIBS) $(APPEND_LDFLAGS) > > .PHONY: install > install: all > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel