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

[Xen-changelog] Move 'debug' build option into the outermost Config.mk file.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 85b34394c9a2fe8a41e77496bf32821053c995cb
# Parent  7e68bc2745afdeb7e948b2365c01f53e00d89e46
Move 'debug' build option into the outermost Config.mk file.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 7e68bc2745af -r 85b34394c9a2 Config.mk
--- a/Config.mk Thu Mar  9 20:17:45 2006
+++ b/Config.mk Thu Mar  9 21:31:45 2006
@@ -1,4 +1,7 @@
 # -*- mode: Makefile; -*-
+
+# A debug build of Xen and tools?
+debug ?= n
 
 # Currently supported architectures: x86_32, x86_64
 XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/)
@@ -8,6 +11,14 @@
 # Tools to run on system hosting the build
 HOSTCC     = gcc
 HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
+
+ifneq ($(debug),y)
+# Optimisation flags are overridable
+CFLAGS    ?= -O3 -fomit-frame-pointer
+CFLAGS    += -DNDEBUG
+else
+CFLAGS    += -g
+endif
 
 AS         = $(CROSS_COMPILE)as
 LD         = $(CROSS_COMPILE)ld
diff -r 7e68bc2745af -r 85b34394c9a2 tools/blktap/Makefile
--- a/tools/blktap/Makefile     Thu Mar  9 20:17:45 2006
+++ b/tools/blktap/Makefile     Thu Mar  9 21:31:45 2006
@@ -24,8 +24,6 @@
 
 CFLAGS   += -Werror
 CFLAGS   += -Wno-unused
-#CFLAGS   += -O3
-CFLAGS   += -g3
 CFLAGS   += -fno-strict-aliasing
 CFLAGS   += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
 # get asprintf():
diff -r 7e68bc2745af -r 85b34394c9a2 tools/blktap/parallax/Makefile
--- a/tools/blktap/parallax/Makefile    Thu Mar  9 20:17:45 2006
+++ b/tools/blktap/parallax/Makefile    Thu Mar  9 21:31:45 2006
@@ -33,8 +33,6 @@
 
 CFLAGS   += -Werror
 CFLAGS   += -Wno-unused
-#CFLAGS   += -O3
-CFLAGS   += -g3
 CFLAGS   += -fno-strict-aliasing
 CFLAGS   += $(INCLUDES)
 CFLAGS   += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
diff -r 7e68bc2745af -r 85b34394c9a2 tools/blktap/ublkback/Makefile
--- a/tools/blktap/ublkback/Makefile    Thu Mar  9 20:17:45 2006
+++ b/tools/blktap/ublkback/Makefile    Thu Mar  9 21:31:45 2006
@@ -11,8 +11,6 @@
 
 CFLAGS   += -Werror
 CFLAGS   += -Wno-unused
-#CFLAGS   += -O3
-CFLAGS   += -g3
 CFLAGS   += -fno-strict-aliasing
 CFLAGS   += -I $(XEN_LIBXC)
 CFLAGS   += $(INCLUDES) -I.
diff -r 7e68bc2745af -r 85b34394c9a2 tools/console/testsuite/Makefile
--- a/tools/console/testsuite/Makefile  Thu Mar  9 20:17:45 2006
+++ b/tools/console/testsuite/Makefile  Thu Mar  9 21:31:45 2006
@@ -1,5 +1,6 @@
-CFLAGS=-g -Wall
-CC=gcc
+XEN_ROOT = ../../..
+include $(XEN_ROOT)/tools/Rules.mk
+
 LDFLAGS=-static
 
 all: console-dom0 console-domU procpipe
diff -r 7e68bc2745af -r 85b34394c9a2 tools/debugger/libxendebug/Makefile
--- a/tools/debugger/libxendebug/Makefile       Thu Mar  9 20:17:45 2006
+++ b/tools/debugger/libxendebug/Makefile       Thu Mar  9 21:31:45 2006
@@ -7,14 +7,12 @@
 MAJOR    = 3.0
 MINOR    = 0
 
-CC       = gcc
-
 XEN_ROOT = ../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 SRCS     := xendebug.c
 
-CFLAGS   += -Werror -O3 -fno-strict-aliasing
+CFLAGS   += -Werror -fno-strict-aliasing
 CFLAGS   += $(INCLUDES) -I. -I$(XEN_ROOT)/tools/libxc
 # Get gcc to generate the dependencies for us.
 CFLAGS   += -Wp,-MD,.$(@F).d
diff -r 7e68bc2745af -r 85b34394c9a2 tools/firmware/acpi/Makefile
--- a/tools/firmware/acpi/Makefile      Thu Mar  9 20:17:45 2006
+++ b/tools/firmware/acpi/Makefile      Thu Mar  9 21:31:45 2006
@@ -16,11 +16,12 @@
 # *
 # */
 #
+
+XEN_ROOT = ../../..
+include $(XEN_ROOT)/tools/Rules.mk
+
 # Compiler flag
-CFLAG=-I. -I../../libxc
-       
-# Compiler tool        
-CC=gcc
+HOSTCFLAGS += -I. -I../../libxc
 
 # TARGET
 C_SRC=$(shell ls *.c)
@@ -33,7 +34,7 @@
 
 vpath iasl $(PATH)
 all:$(ACPI_BIN)
-       
+
 acpi_dsdt.c:acpi_dsdt.asl
        $(MAKE) iasl
        iasl -oa -tc acpi_dsdt.asl
@@ -54,15 +55,13 @@
        install $(IASL_VER)/compiler/iasl /usr/bin/iasl
 
 $(ACPI_GEN):$(C_SRC) $(H_SRC) acpi_dsdt.c
-       $(CC) -o $(ACPI_GEN) $(CFLAG) $(shell ls *.c)
+       $(HOSTCC) -o $(ACPI_GEN) $(HOSTCFLAGS) $(shell ls *.c)
 
 $(ACPI_BIN):$(ACPI_GEN)
        ./$(ACPI_GEN) $(ACPI_BIN)
-       
+
 clean:
        rm -rf *.o $(ACPI_GEN) $(ACPI_BIN) $(IASL_VER) 
-#   rm -f acpi_dsdt.c
        rm -rf  $(IASL_VER).tar.gz
-install:all
-               
-       
+
+install: all
diff -r 7e68bc2745af -r 85b34394c9a2 tools/ioemu/Makefile
--- a/tools/ioemu/Makefile      Thu Mar  9 20:17:45 2006
+++ b/tools/ioemu/Makefile      Thu Mar  9 21:31:45 2006
@@ -3,7 +3,7 @@
 
 -include config-host.mak
 
-CFLAGS+=-O2 -g -fno-strict-aliasing 
+CFLAGS+=-g -fno-strict-aliasing 
 ifdef CONFIG_DARWIN
 CFLAGS+= -mdynamic-no-pic
 endif
diff -r 7e68bc2745af -r 85b34394c9a2 tools/ioemu/configure
--- a/tools/ioemu/configure     Thu Mar  9 20:17:45 2006
+++ b/tools/ioemu/configure     Thu Mar  9 21:31:45 2006
@@ -392,17 +392,17 @@
 echo "configdir=$configdir" >> $config_mak
 echo "LIBDIR=$libdir" >> $config_mak
 echo "#define CONFIG_QEMU_SHAREDIR \"$datadir\"" >> $config_h
-echo "MAKE=$make" >> $config_mak
-echo "CC=$cc" >> $config_mak
-if test "$have_gcc3_options" = "yes" ; then
-  echo "HAVE_GCC3_OPTIONS=yes" >> $config_mak
-fi
-echo "HOST_CC=$host_cc" >> $config_mak
-echo "AR=$ar" >> $config_mak
-echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak
-echo "CFLAGS=$CFLAGS" >> $config_mak
-echo "LDFLAGS=$LDFLAGS" >> $config_mak
-echo "EXESUF=$EXESUF" >> $config_mak
+#echo "MAKE=$make" >> $config_mak
+#echo "CC=$cc" >> $config_mak
+#if test "$have_gcc3_options" = "yes" ; then
+#  echo "HAVE_GCC3_OPTIONS=yes" >> $config_mak
+#fi
+#echo "HOST_CC=$host_cc" >> $config_mak
+#echo "AR=$ar" >> $config_mak
+#echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak
+#echo "CFLAGS=$CFLAGS" >> $config_mak
+#echo "LDFLAGS=$LDFLAGS" >> $config_mak
+#echo "EXESUF=$EXESUF" >> $config_mak
 
 if test "$bigendian" = "yes" ; then
   echo "WORDS_BIGENDIAN=yes" >> $config_mak
diff -r 7e68bc2745af -r 85b34394c9a2 tools/ioemu/target-i386-dm/Makefile
--- a/tools/ioemu/target-i386-dm/Makefile       Thu Mar  9 20:17:45 2006
+++ b/tools/ioemu/target-i386-dm/Makefile       Thu Mar  9 21:31:45 2006
@@ -13,7 +13,7 @@
 VPATH+=:$(SRC_PATH)/linux-user
 DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
 endif
-CFLAGS+=-O2 -g -fno-strict-aliasing
+CFLAGS+=-g -fno-strict-aliasing
 LDFLAGS=-g
 LIBS=
 HELPER_CFLAGS=$(CFLAGS)
@@ -99,7 +99,6 @@
 endif
 
 ifeq ($(ARCH),i386)
-CFLAGS+=-fomit-frame-pointer
 OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2
 ifeq ($(HAVE_GCC3_OPTIONS),yes)
 OP_CFLAGS+= -falign-functions=0 -fno-gcse
diff -r 7e68bc2745af -r 85b34394c9a2 tools/libxc/Makefile
--- a/tools/libxc/Makefile      Thu Mar  9 20:17:45 2006
+++ b/tools/libxc/Makefile      Thu Mar  9 21:31:45 2006
@@ -6,8 +6,6 @@
 
 MAJOR    = 3.0
 MINOR    = 0
-
-CC       = gcc
 
 XEN_ROOT = ../..
 include $(XEN_ROOT)/tools/Rules.mk
@@ -49,7 +47,6 @@
 endif
 
 CFLAGS   += -Werror
-CFLAGS   += -O3
 CFLAGS   += -fno-strict-aliasing
 CFLAGS   += $(INCLUDES) -I.
 
diff -r 7e68bc2745af -r 85b34394c9a2 tools/misc/Makefile
--- a/tools/misc/Makefile       Thu Mar  9 20:17:45 2006
+++ b/tools/misc/Makefile       Thu Mar  9 21:31:45 2006
@@ -5,7 +5,7 @@
 XEN_ROOT=../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-CFLAGS   += -Werror -O3 
+CFLAGS   += -Werror
 
 INCLUDES += -I $(XEN_XC)
 INCLUDES += -I $(XEN_LIBXC)
diff -r 7e68bc2745af -r 85b34394c9a2 tools/misc/cpuperf/Makefile
--- a/tools/misc/cpuperf/Makefile       Thu Mar  9 20:17:45 2006
+++ b/tools/misc/cpuperf/Makefile       Thu Mar  9 21:31:45 2006
@@ -16,8 +16,6 @@
 # these are for Xen
 XEN_ROOT=../../..
 include $(XEN_ROOT)/tools/Rules.mk
-
-CFLAGS      += -O3 
 
 HDRS         = $(wildcard *.h)
 SRCS         = $(wildcard *.c)
diff -r 7e68bc2745af -r 85b34394c9a2 tools/misc/lomount/Makefile
--- a/tools/misc/lomount/Makefile       Thu Mar  9 20:17:45 2006
+++ b/tools/misc/lomount/Makefile       Thu Mar  9 21:31:45 2006
@@ -6,7 +6,7 @@
 XEN_ROOT=../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-CFLAGS  += -Werror -O3
+CFLAGS  += -Werror
 
 HDRS     = $(wildcard *.h)
 OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
diff -r 7e68bc2745af -r 85b34394c9a2 tools/misc/mbootpack/Makefile
--- a/tools/misc/mbootpack/Makefile     Thu Mar  9 20:17:45 2006
+++ b/tools/misc/mbootpack/Makefile     Thu Mar  9 21:31:45 2006
@@ -21,9 +21,7 @@
 DEFS   := 
 LDFLAGS        := 
 CFLAGS += -Wpointer-arith -Wcast-qual -Wno-unused -Wno-format
-CFLAGS += -Wmissing-prototypes
-#CFLAGS        += -pipe -g -O0 -Wcast-align
-CFLAGS += -pipe -O3 
+CFLAGS += -Wmissing-prototypes -pipe
 
 #  What object files need building for the program
 OBJS   := mbootpack.o buildimage.o
diff -r 7e68bc2745af -r 85b34394c9a2 tools/security/Makefile
--- a/tools/security/Makefile   Thu Mar  9 20:17:45 2006
+++ b/tools/security/Makefile   Thu Mar  9 21:31:45 2006
@@ -2,7 +2,6 @@
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS   += -Werror
-CFLAGS   += -O3
 CFLAGS   += -fno-strict-aliasing
 CFLAGS   += -I.
 
diff -r 7e68bc2745af -r 85b34394c9a2 tools/vnet/libxutil/Makefile
--- a/tools/vnet/libxutil/Makefile      Thu Mar  9 20:17:45 2006
+++ b/tools/vnet/libxutil/Makefile      Thu Mar  9 21:31:45 2006
@@ -29,7 +29,7 @@
 LIB_OBJS := $(LIB_SRCS:.c=.o)
 PIC_OBJS := $(LIB_SRCS:.c=.opic)
 
-CFLAGS   += -Werror -O3 -fno-strict-aliasing -g
+CFLAGS   += -Werror -fno-strict-aliasing
 
 # Get gcc to generate the dependencies for us.
 CFLAGS   += -Wp,-MD,.$(@F).d
diff -r 7e68bc2745af -r 85b34394c9a2 tools/vnet/vnetd/Makefile
--- a/tools/vnet/vnetd/Makefile Thu Mar  9 20:17:45 2006
+++ b/tools/vnet/vnetd/Makefile Thu Mar  9 21:31:45 2006
@@ -42,8 +42,6 @@
 CPPFLAGS += -D __ARCH_I386_ATOMIC__
 
 #----------------------------------------------------------------------------
-CFLAGS += -g
-CFLAGS += -O2
 CFLAGS += $(INCLUDES) $(LIBS)
 
 LDFLAGS += $(LIBS)
diff -r 7e68bc2745af -r 85b34394c9a2 tools/xcutils/Makefile
--- a/tools/xcutils/Makefile    Thu Mar  9 20:17:45 2006
+++ b/tools/xcutils/Makefile    Thu Mar  9 21:31:45 2006
@@ -19,7 +19,7 @@
 
 INCLUDES += -I $(XEN_LIBXC)
 
-CFLAGS += -Werror -O3 -fno-strict-aliasing
+CFLAGS += -Werror -fno-strict-aliasing
 CFLAGS += $(INCLUDES)
 
 # Make gcc generate dependencies.
diff -r 7e68bc2745af -r 85b34394c9a2 tools/xenstore/Makefile
--- a/tools/xenstore/Makefile   Thu Mar  9 20:17:45 2006
+++ b/tools/xenstore/Makefile   Thu Mar  9 21:31:45 2006
@@ -12,7 +12,7 @@
 # Make gcc generate dependencies.
 BASECFLAGS += -Wp,-MD,.$(@F).d
 PROG_DEP = .*.d
-BASECFLAGS+= -O3 $(PROFILE)
+BASECFLAGS+= $(PROFILE)
 #BASECFLAGS+= -I$(XEN_ROOT)/tools
 BASECFLAGS+= -I$(XEN_ROOT)/tools/libxc
 BASECFLAGS+= -I.
diff -r 7e68bc2745af -r 85b34394c9a2 tools/xentrace/Makefile
--- a/tools/xentrace/Makefile   Thu Mar  9 20:17:45 2006
+++ b/tools/xentrace/Makefile   Thu Mar  9 21:31:45 2006
@@ -6,7 +6,7 @@
 XEN_ROOT=../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-CFLAGS  += -Werror -O3
+CFLAGS  += -Werror
 
 CFLAGS  += -I $(XEN_XC)
 CFLAGS  += -I $(XEN_LIBXC)
diff -r 7e68bc2745af -r 85b34394c9a2 xen/Rules.mk
--- a/xen/Rules.mk      Thu Mar  9 20:17:45 2006
+++ b/xen/Rules.mk      Thu Mar  9 21:31:45 2006
@@ -4,7 +4,6 @@
 # 'make clean' before rebuilding.
 #
 verbose     ?= n
-debug       ?= n
 perfc       ?= n
 perfc_arrays?= n
 crash_debug ?= n
@@ -47,12 +46,7 @@
 
 CFLAGS += -g -D__XEN__
 
-ifneq ($(debug),y)
-CFLAGS += -DNDEBUG
-ifeq ($(verbose),y)
-CFLAGS += -DVERBOSE
-endif
-else
+ifneq ($(debug)$(verbose),nn)
 CFLAGS += -DVERBOSE
 endif
 
diff -r 7e68bc2745af -r 85b34394c9a2 xen/arch/x86/Rules.mk
--- a/xen/arch/x86/Rules.mk     Thu Mar  9 20:17:45 2006
+++ b/xen/arch/x86/Rules.mk     Thu Mar  9 21:31:45 2006
@@ -13,10 +13,6 @@
 CFLAGS  += -I$(BASEDIR)/include 
 CFLAGS  += -I$(BASEDIR)/include/asm-x86/mach-generic
 CFLAGS  += -I$(BASEDIR)/include/asm-x86/mach-default
-
-ifneq ($(debug),y)
-CFLAGS  += -O3 -fomit-frame-pointer
-endif
 
 # Prevent floating-point variables from creeping into Xen.
 CFLAGS  += -msoft-float

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.