From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: Re: [RFC2] Add stubdomain support
Date: Tue, 12 Feb 2008 14:57:50 +0000 [thread overview]
Message-ID: <20080212145750.GC4951@implementation.uk.xensource.com> (raw)
In-Reply-To: <C3D75E79.1C530%Keir.Fraser@cl.cam.ac.uk>
Keir Fraser, le Tue 12 Feb 2008 14:32:25 +0000, a écrit :
> Applied
Cool!
> please send another patch to override XEN_OS and hence present
> yourself as a new 'OS environment' to the overall build system. That'll
> clean up a good number of your Makefile changes outside stubdom/.
It does indeed, here it is.
Make stubdom/Makefile override XEN_OS to MiniOS, and add config/MiniOS.mk.
Add PTHREAD_LIBS to configs (usually holding -lpthread).
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
diff -r d0b12316994b Config.mk
--- a/Config.mk Tue Feb 12 14:47:14 2008 +0000
+++ b/Config.mk Tue Feb 12 14:51:43 2008 +0000
@@ -27,14 +27,6 @@ DESTDIR ?= /
include $(XEN_ROOT)/config/$(XEN_OS).mk
include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
-
-ifeq ($(stubdom),y)
-include $(XEN_ROOT)/extras/mini-os/Config.mk
-CFLAGS += $(DEF_CFLAGS) $(ARCH_CFLAGS)
-CPPFLAGS += $(DEF_CPPFLAGS) $(ARCH_CPPFLAGS) $(extra_incl)
-ASFLAGS += $(DEF_ASFLAGS) $(ARCH_ASFLAGS)
-LDFLAGS += $(DEF_LDFLAGS) $(ARCH_LDFLAGS)
-endif
ifneq ($(EXTRA_PREFIX),)
EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
diff -r d0b12316994b config/MiniOS.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/config/MiniOS.mk Tue Feb 12 14:51:43 2008 +0000
@@ -0,0 +1,9 @@
+include $(XEN_ROOT)/config/StdGNU.mk
+include $(XEN_ROOT)/extras/mini-os/Config.mk
+CFLAGS += $(DEF_CFLAGS) $(ARCH_CFLAGS)
+CPPFLAGS += $(DEF_CPPFLAGS) $(ARCH_CPPFLAGS) $(extra_incl)
+ASFLAGS += $(DEF_ASFLAGS) $(ARCH_ASFLAGS)
+LDFLAGS += $(DEF_LDFLAGS) $(ARCH_LDFLAGS)
+
+# Override settings for this OS
+PTHREAD_LIBS =
diff -r d0b12316994b config/StdGNU.mk
--- a/config/StdGNU.mk Tue Feb 12 14:47:14 2008 +0000
+++ b/config/StdGNU.mk Tue Feb 12 14:51:43 2008 +0000
@@ -35,6 +35,7 @@ PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin
SOCKET_LIBS =
CURSES_LIBS = -lncurses
+PTHREAD_LIBS = -lpthread
UTIL_LIBS = -lutil
SONAME_LDFLAG = -soname
SHLIB_CFLAGS = -shared
diff -r d0b12316994b config/SunOS.mk
--- a/config/SunOS.mk Tue Feb 12 14:47:14 2008 +0000
+++ b/config/SunOS.mk Tue Feb 12 14:51:43 2008 +0000
@@ -39,6 +39,7 @@ SunOS_LIBDIR_x86_64 = /usr/sfw/lib/amd64
SOCKET_LIBS = -lsocket
CURSES_LIBS = -lcurses
+PTHREAD_LIBS = -lpthread
UTIL_LIBS =
SONAME_LDFLAG = -h
SHLIB_CFLAGS = -R $(SunOS_LIBDIR) -shared
diff -r d0b12316994b stubdom/Makefile
--- a/stubdom/Makefile Tue Feb 12 14:47:14 2008 +0000
+++ b/stubdom/Makefile Tue Feb 12 14:51:43 2008 +0000
@@ -1,4 +1,6 @@ XEN_ROOT = ..
XEN_ROOT = ..
+
+export XEN_OS=MiniOS
include $(XEN_ROOT)/Config.mk
export stubdom=y
diff -r d0b12316994b tools/libxc/Makefile
--- a/tools/libxc/Makefile Tue Feb 12 14:47:14 2008 +0000
+++ b/tools/libxc/Makefile Tue Feb 12 14:51:43 2008 +0000
@@ -25,13 +25,11 @@ CTRL_SRCS-y += xc_resume.c
CTRL_SRCS-y += xc_resume.c
endif
CTRL_SRCS-$(CONFIG_X86) += xc_pagetab.c
-ifneq ($(stubdom),y)
CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
CTRL_SRCS-$(CONFIG_SunOS) += xc_solaris.c
CTRL_SRCS-$(CONFIG_X86_Linux) += xc_ptrace.c xc_ptrace_core.c
CTRL_SRCS-$(CONFIG_NetBSD) += xc_netbsd.c
-endif
-CTRL_SRCS-$(stubdom) += xc_minios.c
+CTRL_SRCS-$(CONFIG_MiniOS) += xc_minios.c
GUEST_SRCS-y :=
GUEST_SRCS-y += xg_private.c
@@ -74,10 +72,6 @@ CFLAGS += -Wp,-MD,.$(@F).d
CFLAGS += -Wp,-MD,.$(@F).d
LDFLAGS += -L.
DEPS = .*.d
-
-ifneq ($(stubdom),y)
-LDLIBS = -lpthread
-endif
CTRL_LIB_OBJS := $(patsubst %.c,%.o,$(CTRL_SRCS-y))
CTRL_PIC_OBJS := $(patsubst %.c,%.opic,$(CTRL_SRCS-y))
@@ -152,7 +146,7 @@ libxenctrl.so.$(MAJOR): libxenctrl.so.$(
ln -sf $< $@
libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS)
- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ $(LDLIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ $(PTHREAD_LIBS)
# libxenguest
@@ -165,7 +159,7 @@ libxenguest.so.$(MAJOR): libxenguest.so.
ln -sf $< $@
libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(LDLIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(PTHREAD_LIBS)
-include $(DEPS)
next prev parent reply other threads:[~2008-02-12 14:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-11 17:40 [RFC] Add stubdomain support Samuel Thibault
2008-02-11 19:14 ` Keir Fraser
2008-02-11 19:21 ` Samuel Thibault
2008-02-11 21:23 ` Keir Fraser
2008-02-12 14:04 ` [RFC2] " Samuel Thibault
2008-02-12 14:32 ` Keir Fraser
2008-02-12 14:57 ` Samuel Thibault [this message]
2008-02-12 15:13 ` Samuel Thibault
2008-02-12 15:24 ` Keir Fraser
2008-02-12 15:42 ` Samuel Thibault
2008-02-12 16:56 ` stubdom: missing two renames Samuel Thibault
2008-02-13 13:32 ` Add stubdomain support Mike D. Day
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080212145750.GC4951@implementation.uk.xensource.com \
--to=samuel.thibault@eu.citrix.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.