x86_64 target support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1191 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
20f3228237
commit
0b0babc623
@ -1,6 +1,10 @@
|
|||||||
include config.mak
|
include config.mak
|
||||||
|
|
||||||
TARGET_PATH=$(SRC_PATH)/target-$(TARGET_ARCH)
|
TARGET_BASE_ARCH:=$(TARGET_ARCH)
|
||||||
|
ifeq ($(TARGET_ARCH), x86_64)
|
||||||
|
TARGET_BASE_ARCH:=i386
|
||||||
|
endif
|
||||||
|
TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
|
||||||
VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
|
VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
|
||||||
DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH)
|
DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH)
|
||||||
ifdef CONFIG_USER_ONLY
|
ifdef CONFIG_USER_ONLY
|
||||||
@ -8,6 +12,7 @@ VPATH+=:$(SRC_PATH)/linux-user
|
|||||||
DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
|
DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
|
||||||
endif
|
endif
|
||||||
CFLAGS=-Wall -O2 -g -fno-strict-aliasing
|
CFLAGS=-Wall -O2 -g -fno-strict-aliasing
|
||||||
|
#CFLAGS+=-Werror
|
||||||
LDFLAGS=-g
|
LDFLAGS=-g
|
||||||
LIBS=
|
LIBS=
|
||||||
HELPER_CFLAGS=$(CFLAGS)
|
HELPER_CFLAGS=$(CFLAGS)
|
||||||
@ -52,6 +57,12 @@ endif # ARCH != i386
|
|||||||
|
|
||||||
endif # TARGET_ARCH = i386
|
endif # TARGET_ARCH = i386
|
||||||
|
|
||||||
|
ifeq ($(TARGET_ARCH), x86_64)
|
||||||
|
ifdef CONFIG_SOFTMMU
|
||||||
|
PROGS+=$(QEMU_SYSTEM)
|
||||||
|
endif
|
||||||
|
endif # TARGET_ARCH = x86_64
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH), ppc)
|
ifeq ($(TARGET_ARCH), ppc)
|
||||||
|
|
||||||
ifeq ($(ARCH), ppc)
|
ifeq ($(ARCH), ppc)
|
||||||
@ -64,11 +75,11 @@ PROGS+=$(QEMU_SYSTEM)
|
|||||||
endif
|
endif
|
||||||
endif # ARCH = i386
|
endif # ARCH = i386
|
||||||
|
|
||||||
ifeq ($(ARCH), amd64)
|
ifeq ($(ARCH), x86_64)
|
||||||
ifdef CONFIG_SOFTMMU
|
ifdef CONFIG_SOFTMMU
|
||||||
PROGS+=$(QEMU_SYSTEM)
|
PROGS+=$(QEMU_SYSTEM)
|
||||||
endif
|
endif
|
||||||
endif # ARCH = amd64
|
endif # ARCH = x86_64
|
||||||
|
|
||||||
endif # TARGET_ARCH = ppc
|
endif # TARGET_ARCH = ppc
|
||||||
|
|
||||||
@ -84,11 +95,11 @@ PROGS+=$(QEMU_SYSTEM)
|
|||||||
endif
|
endif
|
||||||
endif # ARCH = i386
|
endif # ARCH = i386
|
||||||
|
|
||||||
ifeq ($(ARCH), amd64)
|
ifeq ($(ARCH), x86_64)
|
||||||
ifdef CONFIG_SOFTMMU
|
ifdef CONFIG_SOFTMMU
|
||||||
PROGS+=$(QEMU_SYSTEM)
|
PROGS+=$(QEMU_SYSTEM)
|
||||||
endif
|
endif
|
||||||
endif # ARCH = amd64
|
endif # ARCH = x86_64
|
||||||
|
|
||||||
endif # TARGET_ARCH = sparc
|
endif # TARGET_ARCH = sparc
|
||||||
endif # !CONFIG_USER_ONLY
|
endif # !CONFIG_USER_ONLY
|
||||||
@ -122,9 +133,9 @@ LDFLAGS+=-Wl,-shared
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),amd64)
|
ifeq ($(ARCH),x86_64)
|
||||||
OP_CFLAGS=$(CFLAGS) -falign-functions=0
|
OP_CFLAGS=$(CFLAGS) -falign-functions=0
|
||||||
LDFLAGS+=-Wl,-T,$(SRC_PATH)/amd64.ld
|
LDFLAGS+=-Wl,-T,$(SRC_PATH)/x86_64.ld
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),ppc)
|
ifeq ($(ARCH),ppc)
|
||||||
@ -226,6 +237,10 @@ LIBOBJS+=translate-copy.o
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(TARGET_ARCH), x86_64)
|
||||||
|
LIBOBJS+=helper.o helper2.o
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH), ppc)
|
ifeq ($(TARGET_ARCH), ppc)
|
||||||
LIBOBJS+= op_helper.o helper.o
|
LIBOBJS+= op_helper.o helper.o
|
||||||
endif
|
endif
|
||||||
@ -239,7 +254,7 @@ LIBOBJS+=disas.o
|
|||||||
ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386)
|
ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386)
|
||||||
USE_I386_DIS=y
|
USE_I386_DIS=y
|
||||||
endif
|
endif
|
||||||
ifeq ($(findstring amd64, $(TARGET_ARCH) $(ARCH)),amd64)
|
ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64)
|
||||||
USE_I386_DIS=y
|
USE_I386_DIS=y
|
||||||
endif
|
endif
|
||||||
ifdef USE_I386_DIS
|
ifdef USE_I386_DIS
|
||||||
@ -297,11 +312,11 @@ audio.o fmodaudio.o: DEFINES := -I$(CONFIG_FMOD_INC) $(DEFINES)
|
|||||||
LIBS += $(CONFIG_FMOD_LIB)
|
LIBS += $(CONFIG_FMOD_LIB)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH), i386)
|
ifeq ($(TARGET_BASE_ARCH), i386)
|
||||||
# Hardware support
|
# Hardware support
|
||||||
VL_OBJS+= ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
|
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+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pc.o
|
||||||
VL_OBJS+= cirrus_vga.o mixeng.o
|
VL_OBJS+= cirrus_vga.o mixeng.o apic.o
|
||||||
endif
|
endif
|
||||||
ifeq ($(TARGET_ARCH), ppc)
|
ifeq ($(TARGET_ARCH), ppc)
|
||||||
VL_OBJS+= ppc.o ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
|
VL_OBJS+= ppc.o ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
|
||||||
@ -376,7 +391,7 @@ op.o: op.c
|
|||||||
helper.o: helper.c
|
helper.o: helper.c
|
||||||
$(CC) $(HELPER_CFLAGS) $(DEFINES) -c -o $@ $<
|
$(CC) $(HELPER_CFLAGS) $(DEFINES) -c -o $@ $<
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH), i386)
|
ifeq ($(TARGET_BASE_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
|
endif
|
||||||
|
|
||||||
|
15
configure
vendored
15
configure
vendored
@ -27,7 +27,7 @@ ar="ar"
|
|||||||
make="make"
|
make="make"
|
||||||
strip="strip"
|
strip="strip"
|
||||||
cpu=`uname -m`
|
cpu=`uname -m`
|
||||||
target_list="i386-user i386 i386-softmmu arm-user armeb-user sparc-user ppc-user ppc-softmmu sparc-softmmu"
|
target_list="i386-user i386 i386-softmmu arm-user armeb-user sparc-user ppc-user ppc-softmmu sparc-softmmu x86_64-softmmu"
|
||||||
case "$cpu" in
|
case "$cpu" in
|
||||||
i386|i486|i586|i686|i86pc|BePC)
|
i386|i486|i586|i686|i86pc|BePC)
|
||||||
cpu="i386"
|
cpu="i386"
|
||||||
@ -63,7 +63,7 @@ case "$cpu" in
|
|||||||
cpu="m68k"
|
cpu="m68k"
|
||||||
;;
|
;;
|
||||||
x86_64|amd64)
|
x86_64|amd64)
|
||||||
cpu="amd64"
|
cpu="x86_64"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
cpu="unknown"
|
cpu="unknown"
|
||||||
@ -383,9 +383,9 @@ echo "EXESUF=$EXESUF" >> $config_mak
|
|||||||
if test "$cpu" = "i386" ; then
|
if test "$cpu" = "i386" ; then
|
||||||
echo "ARCH=i386" >> $config_mak
|
echo "ARCH=i386" >> $config_mak
|
||||||
echo "#define HOST_I386 1" >> $config_h
|
echo "#define HOST_I386 1" >> $config_h
|
||||||
elif test "$cpu" = "amd64" ; then
|
elif test "$cpu" = "x86_64" ; then
|
||||||
echo "ARCH=amd64" >> $config_mak
|
echo "ARCH=x86_64" >> $config_mak
|
||||||
echo "#define HOST_AMD64 1" >> $config_h
|
echo "#define HOST_X86_64 1" >> $config_h
|
||||||
elif test "$cpu" = "armv4b" ; then
|
elif test "$cpu" = "armv4b" ; then
|
||||||
echo "ARCH=arm" >> $config_mak
|
echo "ARCH=arm" >> $config_mak
|
||||||
echo "#define HOST_ARM 1" >> $config_h
|
echo "#define HOST_ARM 1" >> $config_h
|
||||||
@ -538,6 +538,11 @@ elif test "$target_cpu" = "ppc" ; then
|
|||||||
echo "TARGET_ARCH=ppc" >> $config_mak
|
echo "TARGET_ARCH=ppc" >> $config_mak
|
||||||
echo "#define TARGET_ARCH \"ppc\"" >> $config_h
|
echo "#define TARGET_ARCH \"ppc\"" >> $config_h
|
||||||
echo "#define TARGET_PPC 1" >> $config_h
|
echo "#define TARGET_PPC 1" >> $config_h
|
||||||
|
elif test "$target_cpu" = "x86_64" ; then
|
||||||
|
echo "TARGET_ARCH=x86_64" >> $config_mak
|
||||||
|
echo "#define TARGET_ARCH \"x86_64\"" >> $config_h
|
||||||
|
echo "#define TARGET_I386 1" >> $config_h
|
||||||
|
echo "#define TARGET_X86_64 1" >> $config_h
|
||||||
else
|
else
|
||||||
echo "Unsupported target CPU"
|
echo "Unsupported target CPU"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user