From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CRQOv-0002ZW-0u for qemu-devel@nongnu.org; Tue, 09 Nov 2004 02:26:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CRQOu-0002ZK-CN for qemu-devel@nongnu.org; Tue, 09 Nov 2004 02:26:48 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRQOu-0002ZH-9q for qemu-devel@nongnu.org; Tue, 09 Nov 2004 02:26:48 -0500 Received: from [196.35.40.69] (helo=absamail.co.za) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CRQGI-0008CR-BG for qemu-devel@nongnu.org; Tue, 09 Nov 2004 02:17:55 -0500 From: Bob Barry Date: Tue, 9 Nov 2004 09:17:24 +0200 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200411090917.24153.bobb@absamail.co.za> Subject: [Qemu-devel] patch: i386-users/Makefile Reply-To: bobb@absamail.co.za, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fabrice Bellard , Hetz Ben Hamo Cc: qemu-devel@nongnu.org Fabrice & Hetz - CVS would not compile last night or this morning. A section of the Makefile merge was not completed (>>>>> and ====== and <<<<<< remained). I got lost in the "if's" and "endif's" while looking for the fault, so the patch is mostly indentation. Discard it if it offends "make" purists. Compilation now runs, but fails: qemu/hw/sb16.c:106: storage size of `dsp' isn't known Thanks, Bob =============================================== --- qemu/i386-user/Makefile.orig 2004-11-09 07:55:48.021041760 +0200 +++ qemu/i386-user/Makefile 2004-11-09 08:26:35.497182696 +0200 @@ -14,8 +14,8 @@ VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH) ifdef CONFIG_USER_ONLY -VPATH+=:$(SRC_PATH)/linux-user -DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH) + VPATH+=:$(SRC_PATH)/linux-user + DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH) endif CFLAGS=-Wall -O2 -g -fno-strict-aliasing LDFLAGS=-g @@ -26,165 +26,165 @@ QEMU_USER=qemu-$(TARGET_ARCH) # system emulator name ifdef CONFIG_SOFTMMU -ifeq ($(TARGET_ARCH), i386) -QEMU_SYSTEM=qemu$(EXESUF) -else -QEMU_SYSTEM=qemu-system-$(TARGET_ARCH)$(EXESUF) -endif + ifeq ($(TARGET_ARCH), i386) + QEMU_SYSTEM=qemu$(EXESUF) + else + QEMU_SYSTEM=qemu-system-$(TARGET_ARCH)$(EXESUF) + endif else -QEMU_SYSTEM=qemu-fast + QEMU_SYSTEM=qemu-fast endif ifdef CONFIG_USER_ONLY -PROGS=$(QEMU_USER) + PROGS=$(QEMU_USER) else -ifeq ($(TARGET_ARCH), i386) - -ifeq ($(ARCH), i386) -PROGS+=$(QEMU_SYSTEM) -ifndef CONFIG_SOFTMMU -CONFIG_STATIC=y -endif -else -# the system emulator using soft mmu is portable -ifdef CONFIG_SOFTMMU -PROGS+=$(QEMU_SYSTEM) -endif -endif # ARCH != i386 - -endif # TARGET_ARCH = i386 + ifeq ($(TARGET_ARCH), i386) -ifeq ($(TARGET_ARCH), ppc) - -ifeq ($(ARCH), ppc) -PROGS+=$(QEMU_SYSTEM) -endif - -ifeq ($(ARCH), i386) -ifdef CONFIG_SOFTMMU -PROGS+=$(QEMU_SYSTEM) -endif -endif # ARCH = i386 + ifeq ($(ARCH), i386) + PROGS+=$(QEMU_SYSTEM) + ifndef CONFIG_SOFTMMU + CONFIG_STATIC=y + endif + else + # the system emulator using soft mmu is portable + ifdef CONFIG_SOFTMMU + PROGS+=$(QEMU_SYSTEM) + endif + endif # ARCH != i386 + + endif # TARGET_ARCH = i386 + + ifeq ($(TARGET_ARCH), ppc) + + ifeq ($(ARCH), ppc) + PROGS+=$(QEMU_SYSTEM) + endif + + ifeq ($(ARCH), i386) + ifdef CONFIG_SOFTMMU + PROGS+=$(QEMU_SYSTEM) + endif + endif # ARCH = i386 + + ifeq ($(ARCH), amd64) + ifdef CONFIG_SOFTMMU + PROGS+=$(QEMU_SYSTEM) + endif + endif # ARCH = amd64 + + endif # TARGET_ARCH = ppc + + ifeq ($(TARGET_ARCH), sparc) + + ifeq ($(ARCH), ppc) + PROGS+=$(QEMU_SYSTEM) + endif + + ifeq ($(ARCH), i386) + ifdef CONFIG_SOFTMMU + PROGS+=$(QEMU_SYSTEM) + endif + endif # ARCH = i386 + + ifeq ($(ARCH), amd64) + ifdef CONFIG_SOFTMMU + PROGS+=$(QEMU_SYSTEM) + endif + endif # ARCH = amd64 -ifeq ($(ARCH), amd64) -ifdef CONFIG_SOFTMMU -PROGS+=$(QEMU_SYSTEM) -endif -endif # ARCH = amd64 - -endif # TARGET_ARCH = ppc - -ifeq ($(TARGET_ARCH), sparc) - -ifeq ($(ARCH), ppc) -PROGS+=$(QEMU_SYSTEM) -endif - -ifeq ($(ARCH), i386) -ifdef CONFIG_SOFTMMU -PROGS+=$(QEMU_SYSTEM) -endif -endif # ARCH = i386 - -ifeq ($(ARCH), amd64) -ifdef CONFIG_SOFTMMU -PROGS+=$(QEMU_SYSTEM) -endif -endif # ARCH = amd64 - -endif # TARGET_ARCH = sparc + endif # TARGET_ARCH = sparc endif # !CONFIG_USER_ONLY ifdef CONFIG_STATIC -LDFLAGS+=-static + LDFLAGS+=-static 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 -else -OP_CFLAGS+= -malign-functions=0 -endif - -ifdef TARGET_GPROF -USE_I386_LD=y -endif -ifdef CONFIG_STATIC -USE_I386_LD=y -endif -ifdef USE_I386_LD -LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386.ld -else -# WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object -# that the kernel ELF loader considers as an executable. I think this -# is the simplest way to make it self virtualizable! -LDFLAGS+=-Wl,-shared -endif + CFLAGS+=-fomit-frame-pointer + OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2 + ifeq ($(HAVE_GCC3_OPTIONS),yes) + OP_CFLAGS+= -falign-functions=0 -fno-gcse + else + OP_CFLAGS+= -malign-functions=0 + endif + + ifdef TARGET_GPROF + USE_I386_LD=y + endif + ifdef CONFIG_STATIC + USE_I386_LD=y + endif + ifdef USE_I386_LD + LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386.ld + else + # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object + # that the kernel ELF loader considers as an executable. I think this + # is the simplest way to make it self virtualizable! + LDFLAGS+=-Wl,-shared + endif endif ifeq ($(ARCH),amd64) -OP_CFLAGS=$(CFLAGS) -falign-functions=0 -LDFLAGS+=-Wl,-T,$(SRC_PATH)/amd64.ld + OP_CFLAGS=$(CFLAGS) -falign-functions=0 + LDFLAGS+=-Wl,-T,$(SRC_PATH)/amd64.ld endif ifeq ($(ARCH),ppc) -CFLAGS+= -D__powerpc__ -OP_CFLAGS=$(CFLAGS) -LDFLAGS+=-Wl,-T,$(SRC_PATH)/ppc.ld + CFLAGS+= -D__powerpc__ + OP_CFLAGS=$(CFLAGS) + LDFLAGS+=-Wl,-T,$(SRC_PATH)/ppc.ld endif ifeq ($(ARCH),s390) -OP_CFLAGS=$(CFLAGS) -LDFLAGS+=-Wl,-T,$(SRC_PATH)/s390.ld + OP_CFLAGS=$(CFLAGS) + LDFLAGS+=-Wl,-T,$(SRC_PATH)/s390.ld endif ifeq ($(ARCH),sparc) -CFLAGS+=-m32 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -LDFLAGS+=-m32 -OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0 -HELPER_CFLAGS=$(CFLAGS) -ffixed-i0 -mflat -# -static is used to avoid g1/g3 usage by the dynamic linker -LDFLAGS+=-Wl,-T,$(SRC_PATH)/sparc.ld -static + CFLAGS+=-m32 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 + LDFLAGS+=-m32 + OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0 + HELPER_CFLAGS=$(CFLAGS) -ffixed-i0 -mflat + # -static is used to avoid g1/g3 usage by the dynamic linker + LDFLAGS+=-Wl,-T,$(SRC_PATH)/sparc.ld -static endif ifeq ($(ARCH),sparc64) -CFLAGS+=-m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -LDFLAGS+=-m64 -OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0 + CFLAGS+=-m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 + LDFLAGS+=-m64 + OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0 endif ifeq ($(ARCH),alpha) -# -msmall-data is not used because we want two-instruction relocations -# for the constant constructions -OP_CFLAGS=-Wall -O2 -g -# Ensure there's only a single GP -CFLAGS += -msmall-data -LDFLAGS+=-Wl,-T,$(SRC_PATH)/alpha.ld + # -msmall-data is not used because we want two-instruction relocations + # for the constant constructions + OP_CFLAGS=-Wall -O2 -g + # Ensure there's only a single GP + CFLAGS += -msmall-data + LDFLAGS+=-Wl,-T,$(SRC_PATH)/alpha.ld endif ifeq ($(ARCH),ia64) -OP_CFLAGS=$(CFLAGS) + OP_CFLAGS=$(CFLAGS) endif ifeq ($(ARCH),arm) -OP_CFLAGS=$(CFLAGS) -mno-sched-prolog -LDFLAGS+=-Wl,-T,$(SRC_PATH)/arm.ld + OP_CFLAGS=$(CFLAGS) -mno-sched-prolog + LDFLAGS+=-Wl,-T,$(SRC_PATH)/arm.ld endif ifeq ($(ARCH),m68k) -OP_CFLAGS=$(CFLAGS) -fomit-frame-pointer -LDFLAGS+=-Wl,-T,m68k.ld + OP_CFLAGS=$(CFLAGS) -fomit-frame-pointer + LDFLAGS+=-Wl,-T,m68k.ld endif ifeq ($(HAVE_GCC3_OPTIONS),yes) -# very important to generate a return at the end of every operation -OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls + # very important to generate a return at the end of every operation + OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls endif ifeq ($(CONFIG_DARWIN),yes) -OP_CFLAGS+= -mdynamic-no-pic + OP_CFLAGS+= -mdynamic-no-pic endif ######################################################### @@ -192,16 +192,16 @@ DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE LIBS+=-lm -lstdc++ ifndef CONFIG_USER_ONLY -LIBS+=-lz + LIBS+=-lz endif ifdef CONFIG_WIN32 -LIBS+=-lwinmm -lws2_32 -liphlpapi + LIBS+=-lwinmm -lws2_32 -liphlpapi endif # profiling code ifdef TARGET_GPROF -LDFLAGS+=-p -main.o: CFLAGS+=-p + LDFLAGS+=-p + main.o: CFLAGS+=-p endif OBJS= elfload.o main.o syscall.o mmap.o signal.o path.o osdep.o thunk.o @@ -209,58 +209,57 @@ OBJS+= vm86.o endif ifeq ($(TARGET_ARCH), arm) -OBJS+=nwfpe/softfloat.o nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \ -nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \ - nwfpe/double_cpdo.o nwfpe/extended_cpdo.o + OBJS+=nwfpe/softfloat.o nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \ + nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \ + nwfpe/double_cpdo.o nwfpe/extended_cpdo.o endif SRCS:= $(OBJS:.o=.c) OBJS+= libqemu.a # cpu emulator library -LIBOBJS=exec.o translate-all.o cpu-exec.o\ - translate.o op.o +LIBOBJS=exec.o translate-all.o cpu-exec.o translate.o op.o ifeq ($(TARGET_ARCH), i386) -LIBOBJS+=helper.o helper2.o -ifeq ($(ARCH), i386) -LIBOBJS+=translate-copy.o -endif + LIBOBJS+=helper.o helper2.o + ifeq ($(ARCH), i386) + LIBOBJS+=translate-copy.o + endif endif ifeq ($(TARGET_ARCH), ppc) -LIBOBJS+= op_helper.o helper.o + LIBOBJS+= op_helper.o helper.o endif ifeq ($(TARGET_ARCH), sparc) -LIBOBJS+= op_helper.o helper.o + LIBOBJS+= op_helper.o helper.o endif # NOTE: the disassembler code is only needed for debugging LIBOBJS+=disas.o ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386) -USE_I386_DIS=y + USE_I386_DIS=y endif ifeq ($(findstring amd64, $(TARGET_ARCH) $(ARCH)),amd64) -USE_I386_DIS=y + USE_I386_DIS=y endif ifdef USE_I386_DIS -LIBOBJS+=i386-dis.o + LIBOBJS+=i386-dis.o endif ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha) -LIBOBJS+=alpha-dis.o + LIBOBJS+=alpha-dis.o endif ifeq ($(findstring ppc, $(TARGET_ARCH) $(ARCH)),ppc) -LIBOBJS+=ppc-dis.o + LIBOBJS+=ppc-dis.o endif ifeq ($(findstring sparc, $(TARGET_ARCH) $(ARCH)),sparc) -LIBOBJS+=sparc-dis.o + LIBOBJS+=sparc-dis.o endif ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm) -LIBOBJS+=arm-dis.o + LIBOBJS+=arm-dis.o endif ifeq ($(ARCH),ia64) -OBJS += ia64-syscall.o + OBJS += ia64-syscall.o endif all: $(PROGS) @@ -268,8 +267,8 @@ $(QEMU_USER): $(OBJS) $(CC) $(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) + # 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) echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc endif @@ -281,63 +280,57 @@ AUDIODRV = audio.o ossaudio.o sdlaudio.o wavaudio.o ifeq ($(USE_ADLIB),1) -SOUND_HW += fmopl.o adlib.o -audio.o: DEFINES := -DUSE_ADLIB $(DEFINES) + SOUND_HW += fmopl.o adlib.o + audio.o: DEFINES := -DUSE_ADLIB $(DEFINES) endif ifeq ($(USE_FMOD),1) -AUDIODRV += fmodaudio.o -audio.o fmodaudio.o: DEFINES := -DUSE_FMOD_AUDIO -I$(FMOD_INCLUDE) $(DEFINES) -LDFLAGS += -L$(FMOD_LIBPATH) -Wl,-rpath,$(FMOD_LIBPATH) -LIBS += -lfmod-$(FMOD_VERSION) + AUDIODRV += fmodaudio.o + audio.o fmodaudio.o: DEFINES := -DUSE_FMOD_AUDIO -I$(FMOD_INCLUDE) $(DEFINES) + LDFLAGS += -L$(FMOD_LIBPATH) -Wl,-rpath,$(FMOD_LIBPATH) + LIBS += -lfmod-$(FMOD_VERSION) endif ifeq ($(TARGET_ARCH), i386) -# Hardware support -<<<<<<< Makefile.target -VL_OBJS+= ide.o ne2000.o pckbd.o vga.o sb16.o dma.o oss.o -VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pc.o -VL_OBJS+= cirrus_vga.o mixeng.o -======= -VL_OBJS+= ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) -VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pc.o -VL_OBJS+= cirrus_vga.o mixeng.o ->>>>>>> 1.44 + # Hardware support + VL_OBJS+= ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) + VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pc.o + VL_OBJS+= cirrus_vga.o mixeng.o endif ifeq ($(TARGET_ARCH), ppc) -VL_OBJS+= ppc.o ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) -VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o -VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o mixeng.o + VL_OBJS+= ppc.o ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) + VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o + VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o mixeng.o endif ifeq ($(TARGET_ARCH), sparc) -VL_OBJS+= sun4m.o tcx.o lance.o iommu.o sched.o m48t08.o magic-load.o timer.o + VL_OBJS+= sun4m.o tcx.o lance.o iommu.o sched.o m48t08.o magic-load.o timer.o endif ifdef CONFIG_GDBSTUB -VL_OBJS+=gdbstub.o + VL_OBJS+=gdbstub.o endif ifdef CONFIG_SDL -VL_OBJS+=sdl.o + VL_OBJS+=sdl.o endif ifdef CONFIG_SLIRP -DEFINES+=-I$(SRC_PATH)/slirp -SLIRP_OBJS=cksum.o if.o ip_icmp.o ip_input.o ip_output.o \ -slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o \ -tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o -VL_OBJS+=$(addprefix slirp/, $(SLIRP_OBJS)) + DEFINES+=-I$(SRC_PATH)/slirp + SLIRP_OBJS=cksum.o if.o ip_icmp.o ip_input.o ip_output.o \ + slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o \ + tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o + VL_OBJS+=$(addprefix slirp/, $(SLIRP_OBJS)) endif VL_LDFLAGS= # specific flags are needed for non soft mmu emulator ifdef CONFIG_STATIC -VL_LDFLAGS+=-static + VL_LDFLAGS+=-static endif ifndef CONFIG_SOFTMMU -VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386-vl.ld + VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386-vl.ld endif ifndef CONFIG_DARWIN -ifndef CONFIG_WIN32 -VL_LIBS=-lutil -endif + ifndef CONFIG_WIN32 + VL_LIBS=-lutil + endif endif $(QEMU_SYSTEM): $(VL_OBJS) libqemu.a @@ -375,20 +368,20 @@ $(CC) $(HELPER_CFLAGS) $(DEFINES) -c -o $@ $< ifeq ($(TARGET_ARCH), i386) -op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h + op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h endif ifeq ($(TARGET_ARCH), arm) -op.o: op.c op_template.h + op.o: op.c op_template.h endif ifeq ($(TARGET_ARCH), sparc) -op.o: op.c op_template.h op_mem.h + op.o: op.c op_template.h op_mem.h endif ifeq ($(TARGET_ARCH), ppc) -op.o: op.c op_template.h op_mem.h -op_helper.o: op_helper_mem.h + op.o: op.c op_template.h op_mem.h + op_helper.o: op_helper_mem.h endif mixeng.o: mixeng.c mixeng.h mixeng_template.h @@ -411,5 +404,5 @@ endif ifneq ($(wildcard .depend),) -include .depend + include .depend endif