Commit 6b1534cc67242352b0d200b7b468e503955d3b3a

Authored by bellard
1 parent e8cd23de

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
Showing 1 changed file with 11 additions and 6 deletions
Makefile
@@ -5,6 +5,7 @@ LDFLAGS=-g @@ -5,6 +5,7 @@ LDFLAGS=-g
5 LIBS= 5 LIBS=
6 DEFINES=-DHAVE_BYTESWAP_H 6 DEFINES=-DHAVE_BYTESWAP_H
7 HELPER_CFLAGS=$(CFLAGS) 7 HELPER_CFLAGS=$(CFLAGS)
  8 +PROGS=qemu
8 9
9 ifdef CONFIG_STATIC 10 ifdef CONFIG_STATIC
10 LDFLAGS+=-static 11 LDFLAGS+=-static
@@ -13,7 +14,7 @@ endif @@ -13,7 +14,7 @@ endif
13 ifeq ($(ARCH),i386) 14 ifeq ($(ARCH),i386)
14 CFLAGS+=-fomit-frame-pointer 15 CFLAGS+=-fomit-frame-pointer
15 OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2 16 OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2
16 -ifeq ($(GCC_MAJOR),3) 17 +ifeq ($(HAVE_GCC3_OPTIONS),yes)
17 OP_CFLAGS+= -falign-functions=0 18 OP_CFLAGS+= -falign-functions=0
18 else 19 else
19 OP_CFLAGS+= -malign-functions=0 20 OP_CFLAGS+= -malign-functions=0
@@ -26,6 +27,9 @@ else @@ -26,6 +27,9 @@ else
26 # is the simplest way to make it self virtualizable! 27 # is the simplest way to make it self virtualizable!
27 LDFLAGS+=-Wl,-shared 28 LDFLAGS+=-Wl,-shared
28 endif 29 endif
  30 +ifeq ($(TARGET_ARCH), i386)
  31 +PROGS+=vl
  32 +endif
29 endif 33 endif
30 34
31 ifeq ($(ARCH),ppc) 35 ifeq ($(ARCH),ppc)
@@ -70,7 +74,7 @@ OP_CFLAGS=$(CFLAGS) -mno-sched-prolog @@ -70,7 +74,7 @@ OP_CFLAGS=$(CFLAGS) -mno-sched-prolog
70 LDFLAGS+=-Wl,-T,arm.ld 74 LDFLAGS+=-Wl,-T,arm.ld
71 endif 75 endif
72 76
73 -ifeq ($(GCC_MAJOR),3) 77 +ifeq ($(HAVE_GCC3_OPTIONS),yes)
74 # very important to generate a return at the end of every operation 78 # very important to generate a return at the end of every operation
75 OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls 79 OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls
76 endif 80 endif
@@ -125,7 +129,7 @@ ifeq ($(ARCH),ia64) @@ -125,7 +129,7 @@ ifeq ($(ARCH),ia64)
125 OBJS += ia64-syscall.o 129 OBJS += ia64-syscall.o
126 endif 130 endif
127 131
128 -all: qemu qemu-doc.html 132 +all: $(PROGS) qemu-doc.html
129 133
130 qemu: $(OBJS) 134 qemu: $(OBJS)
131 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) 135 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
@@ -184,8 +188,8 @@ clean: @@ -184,8 +188,8 @@ clean:
184 distclean: clean 188 distclean: clean
185 rm -f config.mak config.h 189 rm -f config.mak config.h
186 190
187 -install: qemu  
188 - install -m 755 -s qemu $(prefix)/bin 191 +install: $(PROGS)
  192 + install -m 755 -s $(PROGS) $(prefix)/bin
189 193
190 # various test targets 194 # various test targets
191 test speed: qemu 195 test speed: qemu
@@ -204,7 +208,8 @@ configure \ @@ -204,7 +208,8 @@ configure \
204 dyngen.c dyngen.h dyngen-exec.h ioctls.h syscall_types.h \ 208 dyngen.c dyngen.h dyngen-exec.h ioctls.h syscall_types.h \
205 Makefile elf.h elfload.c main.c signal.c qemu.h \ 209 Makefile elf.h elfload.c main.c signal.c qemu.h \
206 syscall.c syscall_defs.h vm86.c path.c mmap.c \ 210 syscall.c syscall_defs.h vm86.c path.c mmap.c \
207 -ppc.ld alpha.ld s390.ld sparc.ld arm.ld\ 211 +i386.ld ppc.ld alpha.ld s390.ld sparc.ld arm.ld\
  212 +vl.c i386-vl.ld\
208 thunk.c cpu-exec.c translate.c cpu-all.h thunk.h exec.h\ 213 thunk.c cpu-exec.c translate.c cpu-all.h thunk.h exec.h\
209 exec.c cpu-exec.c\ 214 exec.c cpu-exec.c\
210 cpu-i386.h op-i386.c helper-i386.c syscall-i386.h translate-i386.c \ 215 cpu-i386.h op-i386.c helper-i386.c syscall-i386.h translate-i386.c \