[PATCH] configure.ac: Use -march=arch11..arch13 for z13..z15

Marius Hillenbrand mhillen at linux.ibm.com
Fri Jul 23 10:15:37 UTC 2021


On s390x GCC uses two schemes for -march/-mtune: archNN where NN is the
revision of the architecture reference manual (Principles of Operation)
or the CPU model that introduced that level of architecture extensions.
Some versions of GCC only understand the former for recent architecture
levels. For example, some releases of GCC-9 handle -march=arch13 but do
not accept -march=z15. More recent versions treat both options the same.

This patch switches to using the schem -march=archNN to avoid compile
errors on affected releases of GCC-9 when targeting z15. There is no
change for more recent versions of GCC.
---
 configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index be67915e2..92de1f1cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1401,18 +1401,18 @@ case $host in
         ;;
       z13 | z13esa)
         cpu="z13"
-	gccarch="z13"
+	gccarch="arch11"
 	extra_functions=""
         ;;
       z14 | z14esa)
         cpu="z14"
-	gccarch="z14"
+	gccarch="arch12"
 	extra_functions=""
 	xpath="z13"
         ;;
       z15 | z15esa)
         cpu="z15"
-	gccarch="z15"
+	gccarch="arch13"
 	extra_functions=""
 	xpath="z14 z13"
         ;;
-- 
2.26.2



More information about the gmp-devel mailing list