WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Fix tools build on Solaris

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix tools build on Solaris
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Tue, 17 Oct 2006 14:11:19 +0100
Delivery-date: Tue, 17 Oct 2006 06:11:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
# HG changeset patch
# User john.levon@xxxxxxx
# Date 1161090606 25200
# Node ID c6bfe43048f3becda6966deceb7b70baea833b7c
# Parent  03d4223c846b14fc415cfd05d970c7b4d688fddb
Many of the tools use C99 features such as bool, or expect certain functions.
Fix the CFLAGS to enable these on Solaris.

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff --git a/config/SunOS.mk b/config/SunOS.mk
--- a/config/SunOS.mk
+++ b/config/SunOS.mk
@@ -35,6 +35,8 @@ CFLAGS    += -g
 CFLAGS    += -g
 endif
 
+TOOL_CFLAGS += -std=gnu99 -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__
+
 CAFLAGS = -Wa,--divide
 
 CONFIG_MBOOTPACK_OS = n
diff --git a/tools/blktap/drivers/Makefile b/tools/blktap/drivers/Makefile
--- a/tools/blktap/drivers/Makefile
+++ b/tools/blktap/drivers/Makefile
@@ -8,6 +8,7 @@ INST_DIR  = /usr/sbin
 INST_DIR  = /usr/sbin
 LIBAIO_DIR   = ../../libaio/src
 
+CFLAGS   += $(TOOL_CFLAGS)
 CFLAGS   += -Werror
 CFLAGS   += -Wno-unused
 CFLAGS   += -fno-strict-aliasing
diff --git a/tools/blktap/lib/Makefile b/tools/blktap/lib/Makefile
--- a/tools/blktap/lib/Makefile
+++ b/tools/blktap/lib/Makefile
@@ -14,6 +14,7 @@ SRCS     :=
 SRCS     :=
 SRCS     += xenbus.c blkif.c xs_api.c
 
+CFLAGS   += $(TOOL_CFLAGS)
 CFLAGS   += -Werror
 CFLAGS   += -Wno-unused
 CFLAGS   += -fno-strict-aliasing -fPIC
diff --git a/tools/console/Makefile b/tools/console/Makefile
--- a/tools/console/Makefile
+++ b/tools/console/Makefile
@@ -5,7 +5,7 @@ DAEMON_INSTALL_DIR = /usr/sbin
 DAEMON_INSTALL_DIR = /usr/sbin
 CLIENT_INSTALL_DIR = /usr/$(LIBDIR)/xen/bin
 
-CFLAGS  += -Werror -g
+CFLAGS  += $(TOOL_CFLAGS) -Werror -g
 
 CFLAGS  += -I $(XEN_LIBXC)
 CFLAGS  += -I $(XEN_XENSTORE)
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -29,6 +29,7 @@ GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build
 
 -include $(XEN_TARGET_ARCH)/Makefile
 
+CFLAGS   += $(TOOL_CFLAGS)
 CFLAGS   += -Werror
 CFLAGS   += -fno-strict-aliasing
 CFLAGS   += $(INCLUDES) -I.
diff --git a/tools/misc/Makefile b/tools/misc/Makefile
--- a/tools/misc/Makefile
+++ b/tools/misc/Makefile
@@ -1,7 +1,7 @@ XEN_ROOT=../..
 XEN_ROOT=../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-CFLAGS   += -Werror
+CFLAGS   += $(TOOL_CFLAGS) -Werror
 
 INCLUDES += -I $(XEN_XC)
 INCLUDES += -I $(XEN_LIBXC)
diff --git a/tools/python/Makefile b/tools/python/Makefile
--- a/tools/python/Makefile
+++ b/tools/python/Makefile
@@ -1,20 +1,22 @@ XEN_ROOT = ../..
 XEN_ROOT = ../..
 include $(XEN_ROOT)/tools/Rules.mk
+
+CFLAGS += $(TOOL_CFLAGS)
 
 .PHONY: all
 all: build
 
 .PHONY: build
 build:
-       CFLAGS="$(CFLAGS)" python setup.py build
+       CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py build
 
 .PHONY: install
 ifndef XEN_PYTHON_NATIVE_INSTALL
 install: all
-       CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" 
--prefix="" --force
+       CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install 
--home="$(DESTDIR)/usr" --prefix="" --force
 else
 install: all
-       CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
+       CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install 
--root="$(DESTDIR)" --force
 endif
 
 .PHONY: test
diff --git a/tools/python/setup.py b/tools/python/setup.py
--- a/tools/python/setup.py
+++ b/tools/python/setup.py
@@ -4,7 +4,7 @@ import os
 
 XEN_ROOT = "../.."
 
-extra_compile_args  = [ "-fno-strict-aliasing", "-Wall", "-Werror" ]
+extra_compile_args  = [ "-static-libgcc", "-fno-strict-aliasing", "-Wall", 
"-Werror" ]
 
 
 include_dirs = [ XEN_ROOT + "/tools/libxc",
diff --git a/tools/xenmon/Makefile b/tools/xenmon/Makefile
--- a/tools/xenmon/Makefile
+++ b/tools/xenmon/Makefile
@@ -15,6 +15,7 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 sbindir=/usr/sbin
 
+CFLAGS  += $(TOOL_CFLAGS)
 CFLAGS  += -Werror -g
 CFLAGS  += -I $(XEN_XC)
 CFLAGS  += -I $(XEN_LIBXC)
diff --git a/tools/xenstat/libxenstat/Makefile 
b/tools/xenstat/libxenstat/Makefile
--- a/tools/xenstat/libxenstat/Makefile
+++ b/tools/xenstat/libxenstat/Makefile
@@ -34,6 +34,7 @@ SONAME_FLAGS=$(SONAME_LDFLAG) -Wl,libxen
 
 WARN_FLAGS=-Wall -Werror
 
+CFLAGS+=$(TOOL_CFLAGS)
 CFLAGS+=-Isrc -I$(XEN_LIBXC) -I$(XEN_XENSTORE)
 LDFLAGS+=-Lsrc -L$(XEN_XENSTORE)/ -L$(XEN_LIBXC)/
 
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -7,6 +7,7 @@ MINOR = 0
 
 PROFILE=#-pg
 BASECFLAGS=-Wall -g -Werror
+BASECFLAGS += $(TOOL_CFLAGS)
 # Make gcc generate dependencies.
 BASECFLAGS += -Wp,-MD,.$(@F).d
 PROG_DEP = .*.d

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

<Prev in Thread] Current Thread [Next in Thread>