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