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@eu.citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>

---
v2: Clarify deliberate INSTALL_SHLIB and SYMLINK_SHLIB breakage.
This commit is contained in:
Ian Jackson authored and Ian Jackson committed 2014-07-14 16:07:50 +01:00
1 parent 53e0a72be7
commit 70d597d0ef
5 files changed
+18 -4

No files matched your search

+1
View File
@@ -7,3 +7,4 @@ LDFLAGS += $(DEF_LDFLAGS) $(ARCH_LDFLAGS)
# Override settings for this OS
PTHREAD_LIBS =
nosharedlibs=y
+1
View File
@@ -8,3 +8,4 @@ XEN_LOCK_DIR = /var/lib
WGET = ftp
XENSTORE_XENSTORED=n
nosharedlibs=y
+9
View File
@@ -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)
+3 -3
View File
@@ -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
+4 -1
View File
@@ -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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.