[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] More build config changes:
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID d4e433d615b04f4bbb61f240a3813a8fdb50d1f2 # Parent e408a374840c44a2f3d0e649cd1339aaf60ed5ea More build config changes: - Build -O2 rather than -O3 - Build with -Wstrict-prototypes - Move target-specific generic compiler switches to Config.mk Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> diff -r e408a374840c -r d4e433d615b0 Config.mk --- a/Config.mk Fri Mar 10 15:00:36 2006 +++ b/Config.mk Fri Mar 10 16:32:04 2006 @@ -11,14 +11,6 @@ # 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 @@ -38,6 +30,22 @@ INSTALL_DATA = $(INSTALL) -m0644 INSTALL_PROG = $(INSTALL) -m0755 +ifneq ($(debug),y) +# Optimisation flags are overridable +CFLAGS ?= -O2 -fomit-frame-pointer +CFLAGS += -DNDEBUG +else +CFLAGS += -g +endif + +ifeq ($(XEN_TARGET_ARCH),x86_32) +CFLAGS += -m32 -march=i686 +endif + +ifeq ($(XEN_TARGET_ARCH),x86_64) +CFLAGS += -m64 +endif + ifeq ($(XEN_TARGET_ARCH),x86_64) LIBDIR = lib64 else @@ -51,7 +59,7 @@ test-gcc-flag = $(shell $(1) -v --help 2>&1 | grep -q " $(2) " && echo $(2)) -CFLAGS += -Wall +CFLAGS += -Wall -Wstrict-prototypes HOSTCFLAGS += $(call test-gcc-flag,$(HOSTCC),-Wdeclaration-after-statement) CFLAGS += $(call test-gcc-flag,$(CC),-Wdeclaration-after-statement) diff -r e408a374840c -r d4e433d615b0 tools/Rules.mk --- a/tools/Rules.mk Fri Mar 10 15:00:36 2006 +++ b/tools/Rules.mk Fri Mar 10 16:32:04 2006 @@ -9,16 +9,6 @@ XEN_LIBXC = $(XEN_ROOT)/tools/libxc XEN_XENSTORE = $(XEN_ROOT)/tools/xenstore XEN_LIBXENSTAT = $(XEN_ROOT)/tools/xenstat/libxenstat/src - -ifeq ($(XEN_TARGET_ARCH),x86_32) -CFLAGS += -m32 -march=i686 -LDFLAGS += -m32 -endif - -ifeq ($(XEN_TARGET_ARCH),x86_64) -CFLAGS += -m64 -LDFLAGS += -m64 -endif X11_LDPATH = -L/usr/X11R6/$(LIBDIR) diff -r e408a374840c -r d4e433d615b0 tools/ioemu/target-i386-dm/Makefile --- a/tools/ioemu/target-i386-dm/Makefile Fri Mar 10 15:00:36 2006 +++ b/tools/ioemu/target-i386-dm/Makefile Fri Mar 10 16:32:04 2006 @@ -235,7 +235,7 @@ all: $(PROGS) $(QEMU_USER): $(OBJS) - $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) ifeq ($(ARCH),alpha) # Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of # the address space (31 bit so sign extending doesn't matter) @@ -311,7 +311,7 @@ endif $(QEMU_SYSTEM): $(VL_OBJS) libqemu.a - $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(VNC_LIBS) $(VL_LIBS) -lpthread + $(CC) $(CFLAGS) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(VNC_LIBS) $(VL_LIBS) -lpthread vnc.o: vnc.c keyboard_rdesktop.c $(CC) $(CFLAGS) $(DEFINES) $(VNC_CFLAGS) -c -o $@ $< diff -r e408a374840c -r d4e433d615b0 tools/ioemu/vl.h --- a/tools/ioemu/vl.h Fri Mar 10 15:00:36 2006 +++ b/tools/ioemu/vl.h Fri Mar 10 16:32:04 2006 @@ -697,7 +697,7 @@ void tcx_init(DisplayState *ds, uint32_t addr); /* sched.c */ -void sched_init(); +void sched_init(uint32_t, uint32_t); /* magic-load.c */ void magic_init(const char *kfn, int kloadaddr, uint32_t addr); @@ -799,7 +799,7 @@ int gdbserver_start(int port); void update_select_wakeup_events(void); -void tun_receive_handler(); +void tun_receive_handler(fd_set *); extern char domain_name[]; #endif /* VL_H */ diff -r e408a374840c -r d4e433d615b0 tools/misc/lomount/lomount.c --- a/tools/misc/lomount/lomount.c Fri Mar 10 15:00:36 2006 +++ b/tools/misc/lomount/lomount.c Fri Mar 10 16:32:04 2006 @@ -195,7 +195,7 @@ return fail; } -void usage() +void usage(void) { fprintf(stderr, "You must specify at least -diskimage and -partition.\n"); fprintf(stderr, "All other arguments are passed through to 'mount'.\n"); diff -r e408a374840c -r d4e433d615b0 tools/misc/mbootpack/Makefile --- a/tools/misc/mbootpack/Makefile Fri Mar 10 15:00:36 2006 +++ b/tools/misc/mbootpack/Makefile Fri Mar 10 16:32:04 2006 @@ -31,7 +31,7 @@ DEPS = .*.d mbootpack: $(OBJS) - $(HOSTCC) -o $@ $(filter-out %.a, $^) $(LDFLAGS) + $(HOSTCC) -o $@ $(filter-out %.a, $^) clean: $(RM) mbootpack *.o $(DEPS) bootsect setup bzimage_header.c bin2c diff -r e408a374840c -r d4e433d615b0 tools/misc/xc_shadow.c --- a/tools/misc/xc_shadow.c Fri Mar 10 15:00:36 2006 +++ b/tools/misc/xc_shadow.c Fri Mar 10 16:32:04 2006 @@ -18,7 +18,7 @@ #include <errno.h> #include <string.h> -void usage() +void usage(void) { printf("xc_shadow: -[0|1|2]\n"); printf(" set shadow mode\n"); @@ -28,7 +28,7 @@ int main(int argc, char *argv[]) { int xc_handle; - int mode; + int mode = 0; if ( argc > 1 ) { diff -r e408a374840c -r d4e433d615b0 tools/vtpm_manager/manager/Makefile --- a/tools/vtpm_manager/manager/Makefile Fri Mar 10 15:00:36 2006 +++ b/tools/vtpm_manager/manager/Makefile Fri Mar 10 16:32:04 2006 @@ -20,7 +20,7 @@ rm -f $(BIN) *~ $(BIN): $(OBJS) - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@ # libraries LIBS += ../tcs/libTCS.a ../util/libTCGUtils.a ../crypto/libtcpaCrypto.a diff -r e408a374840c -r d4e433d615b0 tools/xenmon/xenbaked.c --- a/tools/xenmon/xenbaked.c Fri Mar 10 15:00:36 2006 +++ b/tools/xenmon/xenbaked.c Fri Mar 10 16:32:04 2006 @@ -379,7 +379,7 @@ /** * get_num_cpus - get the number of logical CPUs */ -unsigned int get_num_cpus() +unsigned int get_num_cpus(void) { dom0_op_t op; int xc_handle = xc_interface_open(); @@ -409,7 +409,7 @@ /** * monitor_tbufs - monitor the contents of tbufs */ -int monitor_tbufs() +int monitor_tbufs(void) { int i; extern void process_record(int, struct t_rec *); diff -r e408a374840c -r d4e433d615b0 tools/xenstat/libxenstat/Makefile --- a/tools/xenstat/libxenstat/Makefile Fri Mar 10 15:00:36 2006 +++ b/tools/xenstat/libxenstat/Makefile Fri Mar 10 16:32:04 2006 @@ -48,7 +48,7 @@ $(RANLIB) $@ $(SHLIB): $(OBJECTS) - $(CC) $(LDFLAGS) $(SONAME_FLAGS) -shared -o $@ $(OBJECTS) + $(CC) $(CFLAGS) $(LDFLAGS) $(SONAME_FLAGS) -shared -o $@ $(OBJECTS) src/xenstat.o: src/xenstat.c src/xenstat.h src/xen-interface.h $(CC) $(CFLAGS) $(WARN_FLAGS) -c -o $@ $< diff -r e408a374840c -r d4e433d615b0 tools/xenstat/libxenstat/src/xen-interface.c --- a/tools/xenstat/libxenstat/src/xen-interface.c Fri Mar 10 15:00:36 2006 +++ b/tools/xenstat/libxenstat/src/xen-interface.c Fri Mar 10 16:32:04 2006 @@ -31,7 +31,7 @@ /* Initialize for xen-interface. Returns a handle to be used with subsequent * calls to the xen-interface functions or NULL if an error occurs. */ -xi_handle *xi_init() +xi_handle *xi_init(void) { xi_handle *handle; diff -r e408a374840c -r d4e433d615b0 tools/xenstat/libxenstat/src/xen-interface.h --- a/tools/xenstat/libxenstat/src/xen-interface.h Fri Mar 10 15:00:36 2006 +++ b/tools/xenstat/libxenstat/src/xen-interface.h Fri Mar 10 16:32:04 2006 @@ -26,7 +26,7 @@ /* Initialize for xen-interface. Returns a handle to be used with subsequent * calls to the xen-interface functions or NULL if an error occurs. */ -xi_handle *xi_init(); +xi_handle *xi_init(void); /* Release the handle to libxc, free resources, etc. */ void xi_uninit(xi_handle *handle); diff -r e408a374840c -r d4e433d615b0 tools/xenstat/libxenstat/src/xenstat.c --- a/tools/xenstat/libxenstat/src/xenstat.c Fri Mar 10 15:00:36 2006 +++ b/tools/xenstat/libxenstat/src/xenstat.c Fri Mar 10 16:32:04 2006 @@ -129,7 +129,7 @@ /* * libxenstat API */ -xenstat_handle *xenstat_init() +xenstat_handle *xenstat_init(void) { xenstat_handle *handle; diff -r e408a374840c -r d4e433d615b0 tools/xenstat/libxenstat/src/xenstat.h --- a/tools/xenstat/libxenstat/src/xenstat.h Fri Mar 10 15:00:36 2006 +++ b/tools/xenstat/libxenstat/src/xenstat.h Fri Mar 10 16:32:04 2006 @@ -26,7 +26,7 @@ /* Initialize the xenstat library. Returns a handle to be used with * subsequent calls to the xenstat library, or NULL if an error occurs. */ -xenstat_handle *xenstat_init(); +xenstat_handle *xenstat_init(void); /* Release the handle to libxc, free resources, etc. */ void xenstat_uninit(xenstat_handle * handle); diff -r e408a374840c -r d4e433d615b0 tools/xenstore/xenstored_core.c --- a/tools/xenstore/xenstored_core.c Fri Mar 10 15:00:36 2006 +++ b/tools/xenstore/xenstored_core.c Fri Mar 10 16:32:04 2006 @@ -66,7 +66,7 @@ static TDB_CONTEXT *tdb_ctx; static void corrupt(struct connection *conn, const char *fmt, ...); -static void check_store(); +static void check_store(void); #define log(...) \ do { \ @@ -238,7 +238,7 @@ } -static void reopen_log() +static void reopen_log(void) { if (tracefile) { if (tracefd > 0) @@ -1612,7 +1612,7 @@ } -static void check_store() +static void check_store(void) { char * root = talloc_strdup(NULL, "/"); struct hashtable * reachable = diff -r e408a374840c -r d4e433d615b0 tools/xentrace/xentrace.c --- a/tools/xentrace/xentrace.c Fri Mar 10 15:00:36 2006 +++ b/tools/xentrace/xentrace.c Fri Mar 10 16:32:04 2006 @@ -258,7 +258,7 @@ /** * get_num_cpus - get the number of logical CPUs */ -unsigned int get_num_cpus() +unsigned int get_num_cpus(void) { dom0_op_t op; int xc_handle = xc_interface_open(); diff -r e408a374840c -r d4e433d615b0 xen/arch/x86/Rules.mk --- a/xen/arch/x86/Rules.mk Fri Mar 10 15:00:36 2006 +++ b/xen/arch/x86/Rules.mk Fri Mar 10 16:32:04 2006 @@ -22,19 +22,20 @@ CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector) CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector-all) -ifeq ($(TARGET_SUBARCH),x86_32) -CFLAGS += -m32 -march=i686 -LDFLAGS += -m elf_i386 -ifeq ($(pae),y) +ifeq ($(TARGET_SUBARCH)$(pae),x86_32y) CFLAGS += -DCONFIG_X86_PAE=1 endif -endif + ifeq ($(supervisor_mode_kernel),y) CFLAGS += -DCONFIG_X86_SUPERVISOR_MODE_KERNEL=1 endif +ifeq ($(XEN_TARGET_ARCH),x86_32) +LDFLAGS += -m elf_i386 +endif + ifeq ($(TARGET_SUBARCH),x86_64) -CFLAGS += -m64 -mno-red-zone -fpic -fno-reorder-blocks +CFLAGS += -mno-red-zone -fpic -fno-reorder-blocks CFLAGS += -fno-asynchronous-unwind-tables LDFLAGS += -m elf_x86_64 endif diff -r e408a374840c -r d4e433d615b0 xen/arch/x86/audit.c --- a/xen/arch/x86/audit.c Fri Mar 10 15:00:36 2006 +++ b/xen/arch/x86/audit.c Fri Mar 10 16:32:04 2006 @@ -350,7 +350,7 @@ unmap_domain_page(pt); } - void adjust_shadow_tables() + void adjust_shadow_tables(void) { struct shadow_status *a; unsigned long smfn, gmfn; @@ -402,7 +402,7 @@ } } - void adjust_oos_list() + void adjust_oos_list(void) { struct out_of_sync_entry *oos; @@ -426,7 +426,7 @@ } } - void adjust_for_pgtbase() + void adjust_for_pgtbase(void) { struct vcpu *v; @@ -443,7 +443,7 @@ } } - void adjust_guest_pages() + void adjust_guest_pages(void) { struct list_head *list_ent = d->page_list.next; struct page_info *page; diff -r e408a374840c -r d4e433d615b0 xen/arch/x86/hvm/hvm.c --- a/xen/arch/x86/hvm/hvm.c Fri Mar 10 15:00:36 2006 +++ b/xen/arch/x86/hvm/hvm.c Fri Mar 10 16:32:04 2006 @@ -205,12 +205,10 @@ } } -void pic_irq_request(int *interrupt_request, int level) -{ - if (level) - *interrupt_request = 1; - else - *interrupt_request = 0; +void pic_irq_request(void *data, int level) +{ + int *interrupt_request = data; + *interrupt_request = level; } void hvm_pic_assist(struct vcpu *v) diff -r e408a374840c -r d4e433d615b0 xen/arch/x86/hvm/i8259.c --- a/xen/arch/x86/hvm/i8259.c Fri Mar 10 15:00:36 2006 +++ b/xen/arch/x86/hvm/i8259.c Fri Mar 10 16:32:04 2006 @@ -407,7 +407,7 @@ pic_reset(s); } -void pic_init(struct hvm_virpic *s, void (*irq_request)(), +void pic_init(struct hvm_virpic *s, void (*irq_request)(void *, int), void *irq_request_opaque) { memset(s, 0, sizeof(*s)); @@ -422,7 +422,8 @@ return; } -void pic_set_alt_irq_func(struct hvm_virpic *s, void (*alt_irq_func)(), +void pic_set_alt_irq_func(struct hvm_virpic *s, + void (*alt_irq_func)(void *, int, int), void *alt_irq_opaque) { s->alt_irq_func = alt_irq_func; diff -r e408a374840c -r d4e433d615b0 xen/arch/x86/hvm/vmx/vmcs.c --- a/xen/arch/x86/hvm/vmx/vmcs.c Fri Mar 10 15:00:36 2006 +++ b/xen/arch/x86/hvm/vmx/vmcs.c Fri Mar 10 16:32:04 2006 @@ -363,7 +363,7 @@ return error; } -static inline int construct_vmcs_host() +static inline int construct_vmcs_host(void) { int error = 0; #ifdef __x86_64__ diff -r e408a374840c -r d4e433d615b0 xen/arch/x86/hvm/vmx/vmx.c --- a/xen/arch/x86/hvm/vmx/vmx.c Fri Mar 10 15:00:36 2006 +++ b/xen/arch/x86/hvm/vmx/vmx.c Fri Mar 10 16:32:04 2006 @@ -479,12 +479,13 @@ void do_nmi(struct cpu_user_regs *); -static int check_vmx_controls(ctrls, msr) +static int check_vmx_controls(u32 ctrls, u32 msr) { u32 vmx_msr_low, vmx_msr_high; rdmsr(msr, vmx_msr_low, vmx_msr_high); - if (ctrls < vmx_msr_low || ctrls > vmx_msr_high) { + if ( (ctrls < vmx_msr_low) || (ctrls > vmx_msr_high) ) + { printk("Insufficient VMX capability 0x%x, " "msr=0x%x,low=0x%8x,high=0x%x\n", ctrls, msr, vmx_msr_low, vmx_msr_high); diff -r e408a374840c -r d4e433d615b0 xen/common/lib.c --- a/xen/common/lib.c Fri Mar 10 15:00:36 2006 +++ b/xen/common/lib.c Fri Mar 10 16:32:04 2006 @@ -158,8 +158,7 @@ * leading zeros). */ u64 -__qdivrem(uq, vq, arq) - u64 uq, vq, *arq; +__qdivrem(u64 uq, u64 vq, u64 *arq) { union uu tmp; digit *u, *v, *q; @@ -382,8 +381,7 @@ * Divide two unsigned quads. */ u64 -__udivdi3(a, b) - u64 a, b; +__udivdi3(u64 a, u64 b) { return (__qdivrem(a, b, (u64 *)0)); diff -r e408a374840c -r d4e433d615b0 xen/include/asm-x86/hvm/io.h --- a/xen/include/asm-x86/hvm/io.h Fri Mar 10 15:00:36 2006 +++ b/xen/include/asm-x86/hvm/io.h Fri Mar 10 16:32:04 2006 @@ -151,7 +151,7 @@ extern void hvm_wait_io(void); extern void hvm_safe_block(void); extern void hvm_io_assist(struct vcpu *v); -extern void pic_irq_request(int *interrupt_request, int level); +extern void pic_irq_request(void *data, int level); extern void hvm_pic_assist(struct vcpu *v); extern int cpu_get_interrupt(struct vcpu *v, int *type); extern int cpu_has_pending_irq(struct vcpu *v); diff -r e408a374840c -r d4e433d615b0 xen/include/asm-x86/hvm/vpic.h --- a/xen/include/asm-x86/hvm/vpic.h Fri Mar 10 15:00:36 2006 +++ b/xen/include/asm-x86/hvm/vpic.h Fri Mar 10 16:32:04 2006 @@ -55,7 +55,7 @@ /* 0 is master pic, 1 is slave pic */ /* XXX: better separation between the two pics */ PicState pics[2]; - void (*irq_request)(int *opaque, int level); + void (*irq_request)(void *opaque, int level); void *irq_request_opaque; /* IOAPIC callback support */ void (*alt_irq_func)(void *opaque, int irq_num, int level); @@ -66,10 +66,10 @@ void pic_set_irq(struct hvm_virpic *s, int irq, int level); void pic_set_irq_new(void *opaque, int irq, int level); void pic_init(struct hvm_virpic *s, - void (*irq_request)(), + void (*irq_request)(void *, int), void *irq_request_opaque); void pic_set_alt_irq_func(struct hvm_virpic *s, - void(*alt_irq_func)(), + void (*alt_irq_func)(void *, int, int), void *alt_irq_opaque); int pic_read_irq(struct hvm_virpic *s); void pic_update_irq(struct hvm_virpic *s); diff -r e408a374840c -r d4e433d615b0 xen/include/xen/sched.h --- a/xen/include/xen/sched.h Fri Mar 10 15:00:36 2006 +++ b/xen/include/xen/sched.h Fri Mar 10 16:32:04 2006 @@ -266,7 +266,7 @@ void sched_rem_domain(struct vcpu *); long sched_ctl(struct sched_ctl_cmd *); long sched_adjdom(struct sched_adjdom_cmd *); -int sched_id(); +int sched_id(void); void vcpu_wake(struct vcpu *d); void vcpu_sleep_nosync(struct vcpu *d); void vcpu_sleep_sync(struct vcpu *d); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |