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

Re: [Xen-devel] [PATCH v3] tools: honour --libdir when it is passed to ./configure



> > diff -r 32034d1914a6 -r 177d5f1e353f config/Tools.mk.in
> > --- a/config/Tools.mk.in    Thu Jun 07 19:46:57 2012 +0100
> > +++ b/config/Tools.mk.in    Wed Jun 20 00:40:15 2012 +0000
> > @@ -1,6 +1,7 @@
> >   # Prefix and install folder
> >   PREFIX              := @prefix@
> > -LIBLEAFDIR_x86_64   := @LIB_PATH@
> 
> Sorry for the late reply, but if you get rid of LIB_PATH, I think you 
> should also remove AX_DEFAULT_LIB and m4_include([m4/default_lib.m4]) 
> from configure.ac, and remove the macro file tools/m4/default_lib.m4.

This can be a subsequent cleanup I think?

I've just spoken to someone else who has tripped over the lib64 issue --
I think this is a good time to commit this fix.

> 
> > +exec_prefix         := @exec_prefix@
> > +LIBDIR              := @libdir@
> >
> >   # A debug build of tools?
> >   debug               := @debug@
> > diff -r 32034d1914a6 -r 177d5f1e353f config/x86_64.mk
> > --- a/config/x86_64.mk      Thu Jun 07 19:46:57 2012 +0100
> > +++ b/config/x86_64.mk      Wed Jun 20 00:40:15 2012 +0000
> > @@ -10,9 +10,6 @@ CONFIG_IOEMU := y
> >
> >   CFLAGS += -m64
> >
> > -LIBLEAFDIR = $(LIBLEAFDIR_x86_64)
> > -LIBDIR = $(LIBDIR_x86_64)
> > -
> >   SunOS_LIBDIR = $(SunOS_LIBDIR_x86_64)
> >
> >   # Use only if calling $(LD) directly.
> > diff -r 32034d1914a6 -r 177d5f1e353f tools/libfsimage/Rules.mk
> > --- a/tools/libfsimage/Rules.mk     Thu Jun 07 19:46:57 2012 +0100
> > +++ b/tools/libfsimage/Rules.mk     Wed Jun 20 00:40:15 2012 +0000
> > @@ -1,17 +1,12 @@
> >   include $(XEN_ROOT)/tools/Rules.mk
> >
> > -CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/
> > +CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ 
> > -DFSIMAGE_FSDIR=\"$(FSDIR)\"
> >   CFLAGS += -Werror -D_GNU_SOURCE
> >   LDFLAGS += -L../common/
> >
> >   PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
> >
> > -FSDIR-$(CONFIG_Linux) = $(LIBDIR)/fs/$(FS)
> > -FSDIR-$(CONFIG_SunOS)-x86_64 = $(PREFIX)/lib/fs/$(FS)/64
> > -FSDIR-$(CONFIG_SunOS)-x86_32 = $(PREFIX)/lib/fs/$(FS)/
> > -FSDIR-$(CONFIG_SunOS) = $(FSDIR-$(CONFIG_SunOS)-$(XEN_TARGET_ARCH))
> > -FSDIR-$(CONFIG_NetBSD) = $(LIBDIR)/fs/$(FS)
> > -FSDIR = $(FSDIR-y)
> > +FSDIR = $(LIBDIR)/fs
> >
> >   FSLIB = fsimage.so
> >
> > @@ -20,8 +15,8 @@ fs-all: $(FSLIB)
> >
> >   .PHONY: fs-install
> >   fs-install: fs-all
> > -   $(INSTALL_DIR) $(DESTDIR)$(FSDIR)
> > -   $(INSTALL_PROG) $(FSLIB) $(DESTDIR)$(FSDIR)
> > +   $(INSTALL_DIR) $(DESTDIR)$(FSDIR)/$(FS)
> > +   $(INSTALL_PROG) $(FSLIB) $(DESTDIR)$(FSDIR)/$(FS)
> >
> >   $(FSLIB): $(PIC_OBJS)
> >     $(CC) $(LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS) 
> > $(APPEND_LDFLAGS)
> > diff -r 32034d1914a6 -r 177d5f1e353f tools/libfsimage/common/Makefile
> > --- a/tools/libfsimage/common/Makefile      Thu Jun 07 19:46:57 2012 +0100
> > +++ b/tools/libfsimage/common/Makefile      Wed Jun 20 00:40:15 2012 +0000
> > @@ -1,5 +1,5 @@
> >   XEN_ROOT = $(CURDIR)/../../..
> > -include $(XEN_ROOT)/tools/Rules.mk
> > +include $(XEN_ROOT)/tools/libfsimage/Rules.mk
> >
> >   MAJOR = 1.0
> >   MINOR = 0
> > diff -r 32034d1914a6 -r 177d5f1e353f 
> > tools/libfsimage/common/fsimage_plugin.c
> > --- a/tools/libfsimage/common/fsimage_plugin.c      Thu Jun 07 19:46:57 
> > 2012 +0100
> > +++ b/tools/libfsimage/common/fsimage_plugin.c      Wed Jun 20 00:40:15 
> > 2012 +0000
> > @@ -122,7 +122,6 @@ fail:
> >   static int load_plugins(void)
> >   {
> >     const char *fsdir = getenv("FSIMAGE_FSDIR");
> > -   const char *isadir = "";
> >     struct dirent *dp = NULL;
> >     struct dirent *dpp;
> >     DIR *dir = NULL;
> > @@ -131,26 +130,8 @@ static int load_plugins(void)
> >     int err;
> >     int ret = -1;
> >
> > -#if defined(FSIMAGE_FSDIR)
> >     if (fsdir == NULL)
> >             fsdir = FSIMAGE_FSDIR;
> > -#elif defined(__sun__)
> > -   if (fsdir == NULL)
> > -           fsdir = "/usr/lib/fs";
> > -
> > -   if (sizeof(void *) == 8)
> > -           isadir = "64/";
> > -#elif defined(__ia64__)
> > -   if (fsdir == NULL)
> > -           fsdir = "/usr/lib/fs";
> > -#else
> > -   if (fsdir == NULL) {
> > -           if (sizeof(void *) == 8)
> > -                   fsdir = "/usr/lib64/fs";
> > -           else
> > -                   fsdir = "/usr/lib/fs";
> > -   }
> > -#endif
> >
> >     if ((name_max = pathconf(fsdir, _PC_NAME_MAX)) == -1)
> >             goto fail;
> > @@ -172,8 +153,8 @@ static int load_plugins(void)
> >             if (strcmp(dpp->d_name, "..") == 0)
> >                     continue;
> >
> > -           (void) snprintf(tmp, name_max, "%s/%s/%sfsimage.so", fsdir,
> > -               dpp->d_name, isadir);
> > +           (void) snprintf(tmp, name_max, "%s/%s/fsimage.so", fsdir,
> > +                   dpp->d_name);
> >
> >             if (init_plugin(tmp) != 0)
> >                     goto fail;
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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