[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 5 of 5] libxl: fix link issue on uclibc when using yajl



On Sun, 2011-12-18 at 12:48 +0000, Roger Pau Monne wrote:
> # HG changeset patch
> # User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
> # 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 <roger.pau@xxxxxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.