From 5353e78aaf5746e4d911d14df75557b1dac5166b Mon Sep 17 00:00:00 2001 From: Ulrich Hecht Date: Fri, 24 Jul 2009 17:03:48 +0200 Subject: [PATCH 22/33] S/390 host/target build system support changes to configure and makefiles for S/390 host and target support, fixed as suggested by Juan Quintela Signed-off-by: Ulrich Hecht --- Makefile.target | 9 +++++++++ configure | 19 ++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Makefile.target b/Makefile.target index 9c9304c..1080bf0 100644 --- a/Makefile.target +++ b/Makefile.target @@ -84,6 +84,9 @@ CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH) ifeq ($(ARCH),sparc64) CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc endif +ifeq ($(ARCH),s390x) +CPPFLAGS+=-I$(SRC_PATH)/tcg/s390 +endif ifdef CONFIG_SOFTFLOAT libobj-y += fpu/softfloat.o else @@ -211,6 +214,9 @@ endif ifeq ($(ARCH),s390) LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld endif +ifeq ($(ARCH),s390x) +LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld +endif ifeq ($(ARCH),sparc) # -static is used to avoid g1/g3 usage by the dynamic linker @@ -358,6 +364,9 @@ endif ifeq ($(ARCH),s390) LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld endif +ifeq ($(ARCH),s390x) +LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld +endif ifeq ($(ARCH),sparc) # -static is used to avoid g1/g3 usage by the dynamic linker diff --git a/configure b/configure index 97ca826..68fa1c1 100755 --- a/configure +++ b/configure @@ -146,9 +146,12 @@ case "$cpu" in ppc64) cpu="ppc64" ;; - s390*) + s390) cpu="s390" ;; + s390x) + cpu="s390x" + ;; sparc|sun4[cdmuv]) cpu="sparc" ;; @@ -745,6 +748,7 @@ sh4eb-linux-user \ sparc-linux-user \ sparc64-linux-user \ sparc32plus-linux-user \ +s390x-linux-user \ " fi # the following are Darwin specific @@ -809,6 +813,7 @@ hostlongbits="32" if test "$cpu" = "x86_64" \ -o "$cpu" = "alpha" \ -o "$cpu" = "ia64" \ + -o "$cpu" = "s390x" \ -o "$cpu" = "sparc64" \ -o "$cpu" = "ppc64"; then hostlongbits="64" @@ -1499,10 +1504,10 @@ echo "EXESUF=$EXESUF" >> $config_host_mak echo "PTHREADLIBS=$PTHREADLIBS" >> $config_host_mak echo "CLOCKLIBS=$CLOCKLIBS" >> $config_host_mak case "$cpu" in - i386|x86_64|alpha|cris|hppa|ia64|m68k|microbaze|mips|mips64|ppc|ppc64|s390|sparc|sparc64) + i386|x86_64|alpha|cris|hppa|ia64|m68k|microblaze|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64) ARCH=$cpu ;; - armv4b|arm4l) + armv4b|armv4l) ARCH=arm ;; *) @@ -1834,7 +1839,7 @@ config_h=$target_dir/config.h target_arch2=`echo $target | cut -d '-' -f 1` target_bigendian="no" case "$target_arch2" in - armeb|m68k|microblaze|mips|mipsn32|mips64|ppc|ppcemb|ppc64|ppc64abi32|sh4eb|sparc|sparc64|sparc32plus) + armeb|m68k|microblaze|mips|mipsn32|mips64|ppc|ppcemb|ppc64|ppc64abi32|s390x|sh4eb|sparc|sparc64|sparc32plus) target_bigendian=yes ;; esac @@ -1994,6 +1999,10 @@ case "$target_arch2" in echo "TARGET_ABI32=y" >> $config_mak target_phys_bits=64 ;; + s390x) + target_nptl="yes" + target_phys_bits=64 + ;; *) echo "Unsupported target CPU" exit 1 @@ -2062,7 +2071,7 @@ fi echo "TARGET_XML_FILES=$list" >> $config_mak case "$target_arch2" in - arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|sparc|sparc64|sparc32plus) + arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|s390x|sparc|sparc64|sparc32plus) echo "CONFIG_SOFTFLOAT=y" >> $config_mak ;; esac -- 1.6.2.1