From 21f17aaa60deb3c77e487f079621a6993efddd60 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 26 Feb 2016 18:03:07 -0500 Subject: [PATCH 1/2] Modified Makefile and build_tools/build_detect_platform to compile on Linux s390x. --- Makefile | 2 ++ build_tools/build_detect_platform | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 0e3f11e65..8f351b75e 100644 --- a/Makefile +++ b/Makefile @@ -86,10 +86,12 @@ ifneq ($(DEBUG_LEVEL), 2) OPT += -O2 -fno-omit-frame-pointer ifeq (,$(findstring ppc64,$(MACHINE))) # ppc64[le] doesn't support -momit-leaf-frame-pointer ifneq ($(MACHINE),armv7l) +ifneq ($(MACHINE),s390x) OPT += -momit-leaf-frame-pointer endif endif endif +endif # if we're compiling for release, compile without debug code (-DNDEBUG) and # don't treat warnings as errors diff --git a/build_tools/build_detect_platform b/build_tools/build_detect_platform index 5832b03a9..00fae78c5 100755 --- a/build_tools/build_detect_platform +++ b/build_tools/build_detect_platform @@ -360,6 +360,8 @@ fi if test "$USE_SSE"; then # if Intel SSE instruction set is supported, set USE_SSE=1 COMMON_FLAGS="$COMMON_FLAGS -msse -msse4.2 " +elif [ "$TARGET_ARCHITECTURE" = s390x ]; then + COMMON_FLAGS="$COMMON_FLAGS -march=z10 " elif test -z "$PORTABLE"; then if test -n "`echo $TARGET_ARCHITECTURE | grep ^ppc64`"; then # Tune for this POWER processor, treating '+' models as base models From 3373c81fa800fe377491d34bfecd72c5d702c433 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Feb 2016 15:02:52 -0500 Subject: [PATCH 2/2] Modify build_tools/build_detect_platform to detect and set -march=z10 on Linux s390x. --- build_tools/build_detect_platform | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/build_detect_platform b/build_tools/build_detect_platform index 00fae78c5..10a4d497f 100755 --- a/build_tools/build_detect_platform +++ b/build_tools/build_detect_platform @@ -360,13 +360,13 @@ fi if test "$USE_SSE"; then # if Intel SSE instruction set is supported, set USE_SSE=1 COMMON_FLAGS="$COMMON_FLAGS -msse -msse4.2 " -elif [ "$TARGET_ARCHITECTURE" = s390x ]; then - COMMON_FLAGS="$COMMON_FLAGS -march=z10 " elif test -z "$PORTABLE"; then if test -n "`echo $TARGET_ARCHITECTURE | grep ^ppc64`"; then # Tune for this POWER processor, treating '+' models as base models POWER=`LD_SHOW_AUXV=1 /bin/true | grep AT_PLATFORM | grep -E -o power[0-9]+` COMMON_FLAGS="$COMMON_FLAGS -mcpu=$POWER -mtune=$POWER " + elif test -n "`echo $TARGET_ARCHITECTURE | grep ^s390x`"; then + COMMON_FLAGS="$COMMON_FLAGS -march=z10 " else COMMON_FLAGS="$COMMON_FLAGS -march=native " fi