fixed compilation for gcc 2.96 - added QEMU system emulator

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@272 c046a42c-6fe2-441c-8c8c-71466251a162
master
bellard 2003-06-25 16:08:39 +00:00
parent e8cd23de30
commit 6b1534cc67
1 changed files with 11 additions and 6 deletions

View File

@ -5,6 +5,7 @@ LDFLAGS=-g
LIBS= LIBS=
DEFINES=-DHAVE_BYTESWAP_H DEFINES=-DHAVE_BYTESWAP_H
HELPER_CFLAGS=$(CFLAGS) HELPER_CFLAGS=$(CFLAGS)
PROGS=qemu
ifdef CONFIG_STATIC ifdef CONFIG_STATIC
LDFLAGS+=-static LDFLAGS+=-static
@ -13,7 +14,7 @@ endif
ifeq ($(ARCH),i386) ifeq ($(ARCH),i386)
CFLAGS+=-fomit-frame-pointer CFLAGS+=-fomit-frame-pointer
OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2 OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2
ifeq ($(GCC_MAJOR),3) ifeq ($(HAVE_GCC3_OPTIONS),yes)
OP_CFLAGS+= -falign-functions=0 OP_CFLAGS+= -falign-functions=0
else else
OP_CFLAGS+= -malign-functions=0 OP_CFLAGS+= -malign-functions=0
@ -26,6 +27,9 @@ else
# is the simplest way to make it self virtualizable! # is the simplest way to make it self virtualizable!
LDFLAGS+=-Wl,-shared LDFLAGS+=-Wl,-shared
endif endif
ifeq ($(TARGET_ARCH), i386)
PROGS+=vl
endif
endif endif
ifeq ($(ARCH),ppc) ifeq ($(ARCH),ppc)
@ -70,7 +74,7 @@ OP_CFLAGS=$(CFLAGS) -mno-sched-prolog
LDFLAGS+=-Wl,-T,arm.ld LDFLAGS+=-Wl,-T,arm.ld
endif endif
ifeq ($(GCC_MAJOR),3) ifeq ($(HAVE_GCC3_OPTIONS),yes)
# very important to generate a return at the end of every operation # very important to generate a return at the end of every operation
OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls
endif endif
@ -125,7 +129,7 @@ ifeq ($(ARCH),ia64)
OBJS += ia64-syscall.o OBJS += ia64-syscall.o
endif endif
all: qemu qemu-doc.html all: $(PROGS) qemu-doc.html
qemu: $(OBJS) qemu: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
@ -184,8 +188,8 @@ clean:
distclean: clean distclean: clean
rm -f config.mak config.h rm -f config.mak config.h
install: qemu install: $(PROGS)
install -m 755 -s qemu $(prefix)/bin install -m 755 -s $(PROGS) $(prefix)/bin
# various test targets # various test targets
test speed: qemu test speed: qemu
@ -204,7 +208,8 @@ configure \
dyngen.c dyngen.h dyngen-exec.h ioctls.h syscall_types.h \ dyngen.c dyngen.h dyngen-exec.h ioctls.h syscall_types.h \
Makefile elf.h elfload.c main.c signal.c qemu.h \ Makefile elf.h elfload.c main.c signal.c qemu.h \
syscall.c syscall_defs.h vm86.c path.c mmap.c \ syscall.c syscall_defs.h vm86.c path.c mmap.c \
ppc.ld alpha.ld s390.ld sparc.ld arm.ld\ i386.ld ppc.ld alpha.ld s390.ld sparc.ld arm.ld\
vl.c i386-vl.ld\
thunk.c cpu-exec.c translate.c cpu-all.h thunk.h exec.h\ thunk.c cpu-exec.c translate.c cpu-all.h thunk.h exec.h\
exec.c cpu-exec.c\ exec.c cpu-exec.c\
cpu-i386.h op-i386.c helper-i386.c syscall-i386.h translate-i386.c \ cpu-i386.h op-i386.c helper-i386.c syscall-i386.h translate-i386.c \