[PATCH 1/4] configure.ac: remove redundancy in s390 cpu models

Marius Hillenbrand mhillen at linux.ibm.com
Wed Feb 17 10:19:55 UTC 2021


Reduce bulk since all the CPU levels behave the same.
---
 configure.ac | 29 +++++++++--------------------
 1 file changed, 9 insertions(+), 20 deletions(-)

diff --git a/configure.ac b/configure.ac
index 273d3ed99..e520df942 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1373,50 +1373,39 @@ case $host in
       z900 | z900esa)
         cpu="z900"
         gccarch="$cpu"
-	path="s390_32/esame/$cpu s390_32/esame s390_32"
-	gcc_cflags_arch="-march=$gccarch"
-	AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_s390_$cpu)
-	AC_DEFINE(HAVE_HOST_CPU_s390_zarch)
 	extra_functions=""
         ;;
       z990 | z990esa)
         cpu="z990"
         gccarch="$cpu"
-	path="s390_32/esame/$cpu s390_32/esame s390_32"
-	gcc_cflags_arch="-march=$gccarch"
-	AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_s390_$cpu)
-	AC_DEFINE(HAVE_HOST_CPU_s390_zarch)
 	extra_functions=""
         ;;
       z9 | z9esa)
         cpu="z9"
 	gccarch="z9-109"
-	path="s390_32/esame/$cpu s390_32/esame s390_32"
-	gcc_cflags_arch="-march=$gccarch"
-	AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_s390_$cpu)
-	AC_DEFINE(HAVE_HOST_CPU_s390_zarch)
 	extra_functions=""
         ;;
       z10 | z10esa)
         cpu="z10"
 	gccarch="z10"
-	path="s390_32/esame/$cpu s390_32/esame s390_32"
-	gcc_cflags_arch="-march=$gccarch"
-	AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_s390_$cpu)
-	AC_DEFINE(HAVE_HOST_CPU_s390_zarch)
 	extra_functions=""
         ;;
       z196 | z196esa)
         cpu="z196"
 	gccarch="z196"
-	path="s390_32/esame/$cpu s390_32/esame s390_32"
-	gcc_cflags_arch="-march=$gccarch"
-	AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_s390_$cpu)
-	AC_DEFINE(HAVE_HOST_CPU_s390_zarch)
 	extra_functions=""
         ;;
       esac
 
+      if test x"$cpu" != x ; then
+	path="s390_32/esame/$cpu s390_32/esame s390_32"
+	AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_s390_$cpu)
+	AC_DEFINE(HAVE_HOST_CPU_s390_zarch)
+      fi
+      if test x"$gccarch" != x ; then
+	gcc_cflags_arch="-march=$gccarch"
+      fi
+
     case $host in
       S390X_PATTERN)
 	abilist="64 32"
-- 
2.26.2



More information about the gmp-devel mailing list