diff --git a/macros b/macros index cf4819d..05e3169 100644 --- a/macros +++ b/macros @@ -131,6 +131,12 @@ print(result) %__global_fcflags %{build_fflags} %__global_ldflags %{build_ldflags} +# Architecture-specific support. Internal. Do not use directly. + +# Also used for s390. +__cflags_arch_s390x \ +%[0%{?rhel} >= 8 ? "-march=z13 -mtune=z13" : "-march=zEC12 -mtune=z13"] + #============================================================================== # ---- configure and makeinstall. # diff --git a/rpmrc b/rpmrc index c0bad81..a831b9e 100644 --- a/rpmrc +++ b/rpmrc @@ -71,8 +71,8 @@ optflags: atariclone %{__global_compiler_flags} optflags: milan %{__global_compiler_flags} optflags: hades %{__global_compiler_flags} -optflags: s390 %{__global_compiler_flags} -m31 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -optflags: s390x %{__global_compiler_flags} -m64 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -fstack-clash-protection +optflags: s390 %{__global_compiler_flags} -m31 %{__cflags_arch_s390x} -fasynchronous-unwind-tables +optflags: s390x %{__global_compiler_flags} -m64 %{__cflags_arch_s390x} -fasynchronous-unwind-tables -fstack-clash-protection optflags: aarch64 %{__global_compiler_flags} -mbranch-protection=standard -fasynchronous-unwind-tables %[ "%{toolchain}" == "gcc" ? "-fstack-clash-protection" : "" ]