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

[Xen-changelog] [xen master] build system: Introduce nosharedlibs variable.



commit 70d597d0efb85459ee8f7c1498f22ee7ffd390dd
Author:     Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
AuthorDate: Wed May 28 17:06:02 2014 +0100
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Mon Jul 14 16:07:50 2014 +0100

    build system: Introduce nosharedlibs variable.
    
    Introduce a new build variable "nosharedlibs".
    
    In tools/libxc use it instead of $(stubdom).
    In tools/xenstore honour it, and build static clients.
    
    If shared libs are disabled, do not try to install or symlink them.
    
    Set nosharedlibs when building for MiniOS or NetBSDRump.
    
    Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Acked-by: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
    
    ---
    v2: Clarify deliberate INSTALL_SHLIB and SYMLINK_SHLIB breakage.
---
 config/MiniOS.mk        |    1 +
 config/NetBSDRump.mk    |    1 +
 tools/Rules.mk          |    9 +++++++++
 tools/libxc/Makefile    |    6 +++---
 tools/xenstore/Makefile |    5 ++++-
 5 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/config/MiniOS.mk b/config/MiniOS.mk
index fc02b70..32260ad 100644
--- a/config/MiniOS.mk
+++ b/config/MiniOS.mk
@@ -7,3 +7,4 @@ LDFLAGS += $(DEF_LDFLAGS) $(ARCH_LDFLAGS)
 
 # Override settings for this OS
 PTHREAD_LIBS =
+nosharedlibs=y
diff --git a/config/NetBSDRump.mk b/config/NetBSDRump.mk
index e32c1cd..8daade8 100644
--- a/config/NetBSDRump.mk
+++ b/config/NetBSDRump.mk
@@ -8,3 +8,4 @@ XEN_LOCK_DIR = /var/lib
 WGET = ftp
 
 XENSTORE_XENSTORED=n
+nosharedlibs=y
diff --git a/tools/Rules.mk b/tools/Rules.mk
index 327d2b4..9ac8541 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -21,9 +21,18 @@ CFLAGS_xeninclude = -I$(XEN_INCLUDE)
 
 XENSTORE_XENSTORED ?= y
 
+ifneq ($(nosharedlibs),y)
 INSTALL_SHLIB = $(INSTALL_PROG)
 SYMLINK_SHLIB = ln -sf
 libextension = .so
+else
+libextension = .a
+XENSTORE_STATIC_CLIENTS=y
+# If something tries to use these it is a mistake.  Provide references
+# to nonexistent programs to produce a sane error message.
+INSTALL_SHLIB = : install-shlib-unsupported-fail
+SYMLINK_SHLIB = : symlink-shlib-unsupported-fail
+endif
 
 CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_xeninclude)
 LDLIBS_libxenctrl = $(XEN_LIBXC)/libxenctrl$(libextension)
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index 4020f37..22eef8e 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -109,16 +109,16 @@ $(CTRL_LIB_OBJS) $(GUEST_LIB_OBJS) $(OSDEP_LIB_OBJS) \
 $(CTRL_PIC_OBJS) $(GUEST_PIC_OBJS) $(OSDEP_PIC_OBJS) : CFLAGS += -include 
$(XEN_ROOT)/tools/config.h
 
 LIB := libxenctrl.a
-ifneq ($(stubdom),y)
+ifneq ($(nosharedlibs),y)
 LIB += libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MINOR)
 endif
 
 LIB += libxenguest.a
-ifneq ($(stubdom),y)
+ifneq ($(nosharedlibs),y)
 LIB += libxenguest.so libxenguest.so.$(MAJOR) libxenguest.so.$(MAJOR).$(MINOR)
 endif
 
-ifneq ($(stubdom),y)
+ifneq ($(nosharedlibs),y)
 LIB += xenctrl_osdep_ENOSYS.so
 endif
 
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index 0cf06f1..48b4e3d 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -28,7 +28,10 @@ LIBXENSTORE := libxenstore.a
 xenstore xenstore-control: CFLAGS += -static
 endif
 
-ALL_TARGETS = libxenstore.so libxenstore.a clients
+ALL_TARGETS = libxenstore.a clients
+ifneq ($(nosharedlibs),y)
+ALL_TARGETS += libxenstore.so
+endif
 ifeq ($(XENSTORE_XENSTORED),y)
 ALL_TARGETS += xs_tdb_dump xenstored
 endif
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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