ia64/xen-unstable

changeset 9213:85b34394c9a2

Move 'debug' build option into the outermost Config.mk file.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Mar 09 22:31:45 2006 +0100 (2006-03-09)
parents 7e68bc2745af
children e31f21fc391d
files Config.mk tools/blktap/Makefile tools/blktap/parallax/Makefile tools/blktap/ublkback/Makefile tools/console/testsuite/Makefile tools/debugger/libxendebug/Makefile tools/firmware/acpi/Makefile tools/ioemu/Makefile tools/ioemu/configure tools/ioemu/target-i386-dm/Makefile tools/libxc/Makefile tools/misc/Makefile tools/misc/cpuperf/Makefile tools/misc/lomount/Makefile tools/misc/mbootpack/Makefile tools/security/Makefile tools/vnet/libxutil/Makefile tools/vnet/vnetd/Makefile tools/xcutils/Makefile tools/xenstore/Makefile tools/xentrace/Makefile xen/Rules.mk xen/arch/x86/Rules.mk
line diff
     1.1 --- a/Config.mk	Thu Mar 09 21:17:45 2006 +0100
     1.2 +++ b/Config.mk	Thu Mar 09 22:31:45 2006 +0100
     1.3 @@ -1,5 +1,8 @@
     1.4  # -*- mode: Makefile; -*-
     1.5  
     1.6 +# A debug build of Xen and tools?
     1.7 +debug ?= n
     1.8 +
     1.9  # Currently supported architectures: x86_32, x86_64
    1.10  XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/)
    1.11  XEN_TARGET_ARCH     ?= $(XEN_COMPILE_ARCH)
    1.12 @@ -9,6 +12,14 @@ XEN_TARGET_X86_PAE  ?= n
    1.13  HOSTCC     = gcc
    1.14  HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
    1.15  
    1.16 +ifneq ($(debug),y)
    1.17 +# Optimisation flags are overridable
    1.18 +CFLAGS    ?= -O3 -fomit-frame-pointer
    1.19 +CFLAGS    += -DNDEBUG
    1.20 +else
    1.21 +CFLAGS    += -g
    1.22 +endif
    1.23 +
    1.24  AS         = $(CROSS_COMPILE)as
    1.25  LD         = $(CROSS_COMPILE)ld
    1.26  CC         = $(CROSS_COMPILE)gcc
     2.1 --- a/tools/blktap/Makefile	Thu Mar 09 21:17:45 2006 +0100
     2.2 +++ b/tools/blktap/Makefile	Thu Mar 09 22:31:45 2006 +0100
     2.3 @@ -24,8 +24,6 @@ SRCS     += blktaplib.c xenbus.c blkif.c
     2.4  
     2.5  CFLAGS   += -Werror
     2.6  CFLAGS   += -Wno-unused
     2.7 -#CFLAGS   += -O3
     2.8 -CFLAGS   += -g3
     2.9  CFLAGS   += -fno-strict-aliasing
    2.10  CFLAGS   += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
    2.11  # get asprintf():
     3.1 --- a/tools/blktap/parallax/Makefile	Thu Mar 09 21:17:45 2006 +0100
     3.2 +++ b/tools/blktap/parallax/Makefile	Thu Mar 09 22:31:45 2006 +0100
     3.3 @@ -33,8 +33,6 @@ VDI_TOOLS += vdi_validate
     3.4  
     3.5  CFLAGS   += -Werror
     3.6  CFLAGS   += -Wno-unused
     3.7 -#CFLAGS   += -O3
     3.8 -CFLAGS   += -g3
     3.9  CFLAGS   += -fno-strict-aliasing
    3.10  CFLAGS   += $(INCLUDES)
    3.11  CFLAGS   += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
     4.1 --- a/tools/blktap/ublkback/Makefile	Thu Mar 09 21:17:45 2006 +0100
     4.2 +++ b/tools/blktap/ublkback/Makefile	Thu Mar 09 22:31:45 2006 +0100
     4.3 @@ -11,8 +11,6 @@ INSTALL_DIR  = /usr/sbin
     4.4  
     4.5  CFLAGS   += -Werror
     4.6  CFLAGS   += -Wno-unused
     4.7 -#CFLAGS   += -O3
     4.8 -CFLAGS   += -g3
     4.9  CFLAGS   += -fno-strict-aliasing
    4.10  CFLAGS   += -I $(XEN_LIBXC)
    4.11  CFLAGS   += $(INCLUDES) -I.
     5.1 --- a/tools/console/testsuite/Makefile	Thu Mar 09 21:17:45 2006 +0100
     5.2 +++ b/tools/console/testsuite/Makefile	Thu Mar 09 22:31:45 2006 +0100
     5.3 @@ -1,5 +1,6 @@
     5.4 -CFLAGS=-g -Wall
     5.5 -CC=gcc
     5.6 +XEN_ROOT = ../../..
     5.7 +include $(XEN_ROOT)/tools/Rules.mk
     5.8 +
     5.9  LDFLAGS=-static
    5.10  
    5.11  all: console-dom0 console-domU procpipe
     6.1 --- a/tools/debugger/libxendebug/Makefile	Thu Mar 09 21:17:45 2006 +0100
     6.2 +++ b/tools/debugger/libxendebug/Makefile	Thu Mar 09 22:31:45 2006 +0100
     6.3 @@ -7,14 +7,12 @@ INSTALL_DIR	= $(INSTALL) -d -m0755
     6.4  MAJOR    = 3.0
     6.5  MINOR    = 0
     6.6  
     6.7 -CC       = gcc
     6.8 -
     6.9  XEN_ROOT = ../../..
    6.10  include $(XEN_ROOT)/tools/Rules.mk
    6.11  
    6.12  SRCS     := xendebug.c
    6.13  
    6.14 -CFLAGS   += -Werror -O3 -fno-strict-aliasing
    6.15 +CFLAGS   += -Werror -fno-strict-aliasing
    6.16  CFLAGS   += $(INCLUDES) -I. -I$(XEN_ROOT)/tools/libxc
    6.17  # Get gcc to generate the dependencies for us.
    6.18  CFLAGS   += -Wp,-MD,.$(@F).d
     7.1 --- a/tools/firmware/acpi/Makefile	Thu Mar 09 21:17:45 2006 +0100
     7.2 +++ b/tools/firmware/acpi/Makefile	Thu Mar 09 22:31:45 2006 +0100
     7.3 @@ -16,11 +16,12 @@
     7.4  # *
     7.5  # */
     7.6  #
     7.7 +
     7.8 +XEN_ROOT = ../../..
     7.9 +include $(XEN_ROOT)/tools/Rules.mk
    7.10 +
    7.11  # Compiler flag
    7.12 -CFLAG=-I. -I../../libxc
    7.13 -	
    7.14 -# Compiler tool	
    7.15 -CC=gcc
    7.16 +HOSTCFLAGS += -I. -I../../libxc
    7.17  
    7.18  # TARGET
    7.19  C_SRC=$(shell ls *.c)
    7.20 @@ -33,7 +34,7 @@ IASL_URL=http://developer.intel.com/tech
    7.21  
    7.22  vpath iasl $(PATH)
    7.23  all:$(ACPI_BIN)
    7.24 -	
    7.25 +
    7.26  acpi_dsdt.c:acpi_dsdt.asl
    7.27  	$(MAKE) iasl
    7.28  	iasl -oa -tc acpi_dsdt.asl
    7.29 @@ -54,15 +55,13 @@ iasl:
    7.30  	install $(IASL_VER)/compiler/iasl /usr/bin/iasl
    7.31  
    7.32  $(ACPI_GEN):$(C_SRC) $(H_SRC) acpi_dsdt.c
    7.33 -	$(CC) -o $(ACPI_GEN) $(CFLAG) $(shell ls *.c)
    7.34 +	$(HOSTCC) -o $(ACPI_GEN) $(HOSTCFLAGS) $(shell ls *.c)
    7.35  
    7.36  $(ACPI_BIN):$(ACPI_GEN)
    7.37  	./$(ACPI_GEN) $(ACPI_BIN)
    7.38 -	
    7.39 +
    7.40  clean:
    7.41  	rm -rf *.o $(ACPI_GEN) $(ACPI_BIN) $(IASL_VER) 
    7.42 -#   rm -f acpi_dsdt.c
    7.43  	rm -rf  $(IASL_VER).tar.gz
    7.44 -install:all
    7.45 -		
    7.46 -	
    7.47 +
    7.48 +install: all
     8.1 --- a/tools/ioemu/Makefile	Thu Mar 09 21:17:45 2006 +0100
     8.2 +++ b/tools/ioemu/Makefile	Thu Mar 09 22:31:45 2006 +0100
     8.3 @@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
     8.4  
     8.5  -include config-host.mak
     8.6  
     8.7 -CFLAGS+=-O2 -g -fno-strict-aliasing 
     8.8 +CFLAGS+=-g -fno-strict-aliasing 
     8.9  ifdef CONFIG_DARWIN
    8.10  CFLAGS+= -mdynamic-no-pic
    8.11  endif
     9.1 --- a/tools/ioemu/configure	Thu Mar 09 21:17:45 2006 +0100
     9.2 +++ b/tools/ioemu/configure	Thu Mar 09 22:31:45 2006 +0100
     9.3 @@ -392,17 +392,17 @@ echo "docdir=$docdir" >> $config_mak
     9.4  echo "configdir=$configdir" >> $config_mak
     9.5  echo "LIBDIR=$libdir" >> $config_mak
     9.6  echo "#define CONFIG_QEMU_SHAREDIR \"$datadir\"" >> $config_h
     9.7 -echo "MAKE=$make" >> $config_mak
     9.8 -echo "CC=$cc" >> $config_mak
     9.9 -if test "$have_gcc3_options" = "yes" ; then
    9.10 -  echo "HAVE_GCC3_OPTIONS=yes" >> $config_mak
    9.11 -fi
    9.12 -echo "HOST_CC=$host_cc" >> $config_mak
    9.13 -echo "AR=$ar" >> $config_mak
    9.14 -echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak
    9.15 -echo "CFLAGS=$CFLAGS" >> $config_mak
    9.16 -echo "LDFLAGS=$LDFLAGS" >> $config_mak
    9.17 -echo "EXESUF=$EXESUF" >> $config_mak
    9.18 +#echo "MAKE=$make" >> $config_mak
    9.19 +#echo "CC=$cc" >> $config_mak
    9.20 +#if test "$have_gcc3_options" = "yes" ; then
    9.21 +#  echo "HAVE_GCC3_OPTIONS=yes" >> $config_mak
    9.22 +#fi
    9.23 +#echo "HOST_CC=$host_cc" >> $config_mak
    9.24 +#echo "AR=$ar" >> $config_mak
    9.25 +#echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak
    9.26 +#echo "CFLAGS=$CFLAGS" >> $config_mak
    9.27 +#echo "LDFLAGS=$LDFLAGS" >> $config_mak
    9.28 +#echo "EXESUF=$EXESUF" >> $config_mak
    9.29  
    9.30  if test "$bigendian" = "yes" ; then
    9.31    echo "WORDS_BIGENDIAN=yes" >> $config_mak
    10.1 --- a/tools/ioemu/target-i386-dm/Makefile	Thu Mar 09 21:17:45 2006 +0100
    10.2 +++ b/tools/ioemu/target-i386-dm/Makefile	Thu Mar 09 22:31:45 2006 +0100
    10.3 @@ -13,7 +13,7 @@ ifdef CONFIG_USER_ONLY
    10.4  VPATH+=:$(SRC_PATH)/linux-user
    10.5  DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
    10.6  endif
    10.7 -CFLAGS+=-O2 -g -fno-strict-aliasing
    10.8 +CFLAGS+=-g -fno-strict-aliasing
    10.9  LDFLAGS=-g
   10.10  LIBS=
   10.11  HELPER_CFLAGS=$(CFLAGS)
   10.12 @@ -99,7 +99,6 @@ LDFLAGS+=-static
   10.13  endif
   10.14  
   10.15  ifeq ($(ARCH),i386)
   10.16 -CFLAGS+=-fomit-frame-pointer
   10.17  OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2
   10.18  ifeq ($(HAVE_GCC3_OPTIONS),yes)
   10.19  OP_CFLAGS+= -falign-functions=0 -fno-gcse
    11.1 --- a/tools/libxc/Makefile	Thu Mar 09 21:17:45 2006 +0100
    11.2 +++ b/tools/libxc/Makefile	Thu Mar 09 22:31:45 2006 +0100
    11.3 @@ -7,8 +7,6 @@ INSTALL_DIR	= $(INSTALL) -d -m0755
    11.4  MAJOR    = 3.0
    11.5  MINOR    = 0
    11.6  
    11.7 -CC       = gcc
    11.8 -
    11.9  XEN_ROOT = ../..
   11.10  include $(XEN_ROOT)/tools/Rules.mk
   11.11  
   11.12 @@ -49,7 +47,6 @@ BUILD_SRCS += xc_hvm_build.c
   11.13  endif
   11.14  
   11.15  CFLAGS   += -Werror
   11.16 -CFLAGS   += -O3
   11.17  CFLAGS   += -fno-strict-aliasing
   11.18  CFLAGS   += $(INCLUDES) -I.
   11.19  
    12.1 --- a/tools/misc/Makefile	Thu Mar 09 21:17:45 2006 +0100
    12.2 +++ b/tools/misc/Makefile	Thu Mar 09 22:31:45 2006 +0100
    12.3 @@ -5,7 +5,7 @@ INSTALL_DIR	= $(INSTALL) -d -m0755
    12.4  XEN_ROOT=../..
    12.5  include $(XEN_ROOT)/tools/Rules.mk
    12.6  
    12.7 -CFLAGS   += -Werror -O3 
    12.8 +CFLAGS   += -Werror
    12.9  
   12.10  INCLUDES += -I $(XEN_XC)
   12.11  INCLUDES += -I $(XEN_LIBXC)
    13.1 --- a/tools/misc/cpuperf/Makefile	Thu Mar 09 21:17:45 2006 +0100
    13.2 +++ b/tools/misc/cpuperf/Makefile	Thu Mar 09 22:31:45 2006 +0100
    13.3 @@ -17,8 +17,6 @@ INSTALL_DIR	= $(INSTALL) -d -m0755
    13.4  XEN_ROOT=../../..
    13.5  include $(XEN_ROOT)/tools/Rules.mk
    13.6  
    13.7 -CFLAGS      += -O3 
    13.8 -
    13.9  HDRS         = $(wildcard *.h)
   13.10  SRCS         = $(wildcard *.c)
   13.11  OBJS         = $(patsubst %.c,%.o,$(SRCS))
    14.1 --- a/tools/misc/lomount/Makefile	Thu Mar 09 21:17:45 2006 +0100
    14.2 +++ b/tools/misc/lomount/Makefile	Thu Mar 09 22:31:45 2006 +0100
    14.3 @@ -6,7 +6,7 @@ INSTALL_DATA	= $(INSTALL) -m0644
    14.4  XEN_ROOT=../../..
    14.5  include $(XEN_ROOT)/tools/Rules.mk
    14.6  
    14.7 -CFLAGS  += -Werror -O3
    14.8 +CFLAGS  += -Werror
    14.9  
   14.10  HDRS     = $(wildcard *.h)
   14.11  OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
    15.1 --- a/tools/misc/mbootpack/Makefile	Thu Mar 09 21:17:45 2006 +0100
    15.2 +++ b/tools/misc/mbootpack/Makefile	Thu Mar 09 22:31:45 2006 +0100
    15.3 @@ -21,9 +21,7 @@ INCS	:= -I. -I-
    15.4  DEFS	:= 
    15.5  LDFLAGS	:= 
    15.6  CFLAGS	+= -Wpointer-arith -Wcast-qual -Wno-unused -Wno-format
    15.7 -CFLAGS	+= -Wmissing-prototypes
    15.8 -#CFLAGS	+= -pipe -g -O0 -Wcast-align
    15.9 -CFLAGS	+= -pipe -O3 
   15.10 +CFLAGS	+= -Wmissing-prototypes -pipe
   15.11  
   15.12  #  What object files need building for the program
   15.13  OBJS	:= mbootpack.o buildimage.o
    16.1 --- a/tools/security/Makefile	Thu Mar 09 21:17:45 2006 +0100
    16.2 +++ b/tools/security/Makefile	Thu Mar 09 22:31:45 2006 +0100
    16.3 @@ -2,7 +2,6 @@ XEN_ROOT = ../..
    16.4  include $(XEN_ROOT)/tools/Rules.mk
    16.5  
    16.6  CFLAGS   += -Werror
    16.7 -CFLAGS   += -O3
    16.8  CFLAGS   += -fno-strict-aliasing
    16.9  CFLAGS   += -I.
   16.10  
    17.1 --- a/tools/vnet/libxutil/Makefile	Thu Mar 09 21:17:45 2006 +0100
    17.2 +++ b/tools/vnet/libxutil/Makefile	Thu Mar 09 22:31:45 2006 +0100
    17.3 @@ -29,7 +29,7 @@ LIB_SRCS += util.c
    17.4  LIB_OBJS := $(LIB_SRCS:.c=.o)
    17.5  PIC_OBJS := $(LIB_SRCS:.c=.opic)
    17.6  
    17.7 -CFLAGS   += -Werror -O3 -fno-strict-aliasing -g
    17.8 +CFLAGS   += -Werror -fno-strict-aliasing
    17.9  
   17.10  # Get gcc to generate the dependencies for us.
   17.11  CFLAGS   += -Wp,-MD,.$(@F).d
    18.1 --- a/tools/vnet/vnetd/Makefile	Thu Mar 09 21:17:45 2006 +0100
    18.2 +++ b/tools/vnet/vnetd/Makefile	Thu Mar 09 22:31:45 2006 +0100
    18.3 @@ -42,8 +42,6 @@ CPPFLAGS += -D USE_GC
    18.4  CPPFLAGS += -D __ARCH_I386_ATOMIC__
    18.5  
    18.6  #----------------------------------------------------------------------------
    18.7 -CFLAGS += -g
    18.8 -CFLAGS += -O2
    18.9  CFLAGS += $(INCLUDES) $(LIBS)
   18.10  
   18.11  LDFLAGS += $(LIBS)
    19.1 --- a/tools/xcutils/Makefile	Thu Mar 09 21:17:45 2006 +0100
    19.2 +++ b/tools/xcutils/Makefile	Thu Mar 09 22:31:45 2006 +0100
    19.3 @@ -19,7 +19,7 @@ PROGRAMS_INSTALL_DIR = /usr/$(LIBDIR)/xe
    19.4  
    19.5  INCLUDES += -I $(XEN_LIBXC)
    19.6  
    19.7 -CFLAGS += -Werror -O3 -fno-strict-aliasing
    19.8 +CFLAGS += -Werror -fno-strict-aliasing
    19.9  CFLAGS += $(INCLUDES)
   19.10  
   19.11  # Make gcc generate dependencies.
    20.1 --- a/tools/xenstore/Makefile	Thu Mar 09 21:17:45 2006 +0100
    20.2 +++ b/tools/xenstore/Makefile	Thu Mar 09 22:31:45 2006 +0100
    20.3 @@ -12,7 +12,7 @@ BASECFLAGS=-Wall -g -Werror
    20.4  # Make gcc generate dependencies.
    20.5  BASECFLAGS += -Wp,-MD,.$(@F).d
    20.6  PROG_DEP = .*.d
    20.7 -BASECFLAGS+= -O3 $(PROFILE)
    20.8 +BASECFLAGS+= $(PROFILE)
    20.9  #BASECFLAGS+= -I$(XEN_ROOT)/tools
   20.10  BASECFLAGS+= -I$(XEN_ROOT)/tools/libxc
   20.11  BASECFLAGS+= -I.
    21.1 --- a/tools/xentrace/Makefile	Thu Mar 09 21:17:45 2006 +0100
    21.2 +++ b/tools/xentrace/Makefile	Thu Mar 09 22:31:45 2006 +0100
    21.3 @@ -6,7 +6,7 @@ INSTALL_DATA	= $(INSTALL) -m0644
    21.4  XEN_ROOT=../..
    21.5  include $(XEN_ROOT)/tools/Rules.mk
    21.6  
    21.7 -CFLAGS  += -Werror -O3
    21.8 +CFLAGS  += -Werror
    21.9  
   21.10  CFLAGS  += -I $(XEN_XC)
   21.11  CFLAGS  += -I $(XEN_LIBXC)
    22.1 --- a/xen/Rules.mk	Thu Mar 09 21:17:45 2006 +0100
    22.2 +++ b/xen/Rules.mk	Thu Mar 09 22:31:45 2006 +0100
    22.3 @@ -4,7 +4,6 @@
    22.4  # 'make clean' before rebuilding.
    22.5  #
    22.6  verbose     ?= n
    22.7 -debug       ?= n
    22.8  perfc       ?= n
    22.9  perfc_arrays?= n
   22.10  crash_debug ?= n
   22.11 @@ -47,12 +46,7 @@ include $(BASEDIR)/arch/$(TARGET_ARCH)/R
   22.12  
   22.13  CFLAGS += -g -D__XEN__
   22.14  
   22.15 -ifneq ($(debug),y)
   22.16 -CFLAGS += -DNDEBUG
   22.17 -ifeq ($(verbose),y)
   22.18 -CFLAGS += -DVERBOSE
   22.19 -endif
   22.20 -else
   22.21 +ifneq ($(debug)$(verbose),nn)
   22.22  CFLAGS += -DVERBOSE
   22.23  endif
   22.24  
    23.1 --- a/xen/arch/x86/Rules.mk	Thu Mar 09 21:17:45 2006 +0100
    23.2 +++ b/xen/arch/x86/Rules.mk	Thu Mar 09 22:31:45 2006 +0100
    23.3 @@ -14,10 +14,6 @@ CFLAGS  += -I$(BASEDIR)/include
    23.4  CFLAGS  += -I$(BASEDIR)/include/asm-x86/mach-generic
    23.5  CFLAGS  += -I$(BASEDIR)/include/asm-x86/mach-default
    23.6  
    23.7 -ifneq ($(debug),y)
    23.8 -CFLAGS  += -O3 -fomit-frame-pointer
    23.9 -endif
   23.10 -
   23.11  # Prevent floating-point variables from creeping into Xen.
   23.12  CFLAGS  += -msoft-float
   23.13