Bug 1404991 - Fedora - set the minimum architecture level to zEC12
Summary: Fedora - set the minimum architecture level to zEC12
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config
Version: rawhide
Hardware: s390x
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Dan Horák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ZedoraTracker
TreeView+ depends on / blocked
 
Reported: 2016-12-15 10:23 UTC by Dan Horák
Modified: 2017-02-10 09:56 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-10 09:56:33 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
IBM Linux Technology Center 149973 None None None 2019-05-22 09:08:39 UTC

Description Dan Horák 2016-12-15 10:23:10 UTC
We want to move the minimum architecture level for s390(x) as defined in the distro-wide compiler flags to zEC12.

diff --git a/rpmrc b/rpmrc
index 9ea6aaa..e8fecd5 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=z10 -mtune=z10
-optflags: s390x %{__global_compiler_flags} -m64 -march=z10 -mtune=z10
+optflags: s390 %{__global_compiler_flags} -m31 -march=zEC12 -mtune=zEC12
+optflags: s390x %{__global_compiler_flags} -m64 -march=zEC12 -mtune=zEC12
 
 optflags: aarch64 %{__global_compiler_flags}
 

The decision is based on discussion with our partners and also on HW availability for Fedora maintainers and upstream (we got our public guest migrated from z10 to z13 recently, IBM also provides guest on z13-class machine).

Comment 1 Dan Horák 2016-12-15 10:25:10 UTC
This is meant for F>=26 only.

Comment 2 Carlos O'Donell 2016-12-15 16:04:45 UTC
Have the crit-path packages been built with these changes to prove viability? I've never built glibc with `-march=zEC12`, and while I don't expect anything to break, it might? Would be nice to smoke test this before we roll it out, but that's relatively easy for you test, just do scratch builds and post the scratch build URLs here. For glibc I'd be happy to review the test results.

Comment 3 IBM Bug Proxy 2017-01-27 14:30:27 UTC
------- Comment From mgrf@de.ibm.com 2017-01-27 09:27 EDT-------
Yes zEC12 as minimum hardware is what should be planned for per today.
compile with  -march=zEC12 and -mtune=z13

Based on review results until short before cutoffs this might have to be adapted to
-march=z13

Will post updates

Comment 4 Dan Horák 2017-02-01 15:32:28 UTC
(In reply to Carlos O'Donell from comment #2)
> Have the crit-path packages been built with these changes to prove
> viability? I've never built glibc with `-march=zEC12`, and while I don't
> expect anything to break, it might? Would be nice to smoke test this before
> we roll it out, but that's relatively easy for you test, just do scratch
> builds and post the scratch build URLs here. For glibc I'd be happy to
> review the test results.

Carlos, looks to me that glibc spec file is completely ignoring the system-wide compiler flags set via /usr/lib/rpm/redhat/rpmrc (and available as $RPM_OPT_FLAGS or %{optflags} variables or the %configure macro). So this change is a no-op for glibc.

What we might want to change is
...
running configure fragment for sysdeps/s390
checking for as... (cached) as
checking version of as... 2.27, ok
checking for __builtin_tbegin... yes
checking for S390 vector instruction support... yes
checking for S390 vector support in gcc... yes
checking for S390 z196 zarch instruction support as default... no
 ^^^ 
 set it to "yes" for a later glibc update

Comment 5 Carlos O'Donell 2017-02-01 16:03:50 UTC
(In reply to Dan Horák from comment #4)
> (In reply to Carlos O'Donell from comment #2)
> > Have the crit-path packages been built with these changes to prove
> > viability? I've never built glibc with `-march=zEC12`, and while I don't
> > expect anything to break, it might? Would be nice to smoke test this before
> > we roll it out, but that's relatively easy for you test, just do scratch
> > builds and post the scratch build URLs here. For glibc I'd be happy to
> > review the test results.
> 
> Carlos, looks to me that glibc spec file is completely ignoring the
> system-wide compiler flags set via /usr/lib/rpm/redhat/rpmrc (and available
> as $RPM_OPT_FLAGS or %{optflags} variables or the %configure macro). So this
> change is a no-op for glibc.
> 
> What we might want to change is
> ...
> running configure fragment for sysdeps/s390
> checking for as... (cached) as
> checking version of as... 2.27, ok
> checking for __builtin_tbegin... yes
> checking for S390 vector instruction support... yes
> checking for S390 vector support in gcc... yes
> checking for S390 z196 zarch instruction support as default... no
>  ^^^ 
>  set it to "yes" for a later glibc update

Yes, glibc _always_ needs a manual update. We don't use optflags on purpose. If something goes wrong there we'd break the entire distribution.

I've kicked off a scratch build with zEC12 support here:
https://s390.koji.fedoraproject.org/koji/taskinfo?taskID=2458652

I'll see how it goes.

Comment 6 Dan Horák 2017-02-01 16:09:28 UTC
https://s390.koji.fedoraproject.org/koji/taskinfo?taskID=2458651 is gcc7 with

diff --git a/gcc.spec b/gcc.spec
index 8d4e67f..83b43cc 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -94,7 +94,7 @@
 Summary: Various compilers (C, C++, Objective-C, Java, ...)
 Name: gcc
 Version: %{gcc_version}
-Release: %{gcc_release}%{?dist}
+Release: %{gcc_release}%{?dist}.1
 # libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
 # GCC Runtime Exception.
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -1120,9 +1120,13 @@ CONFIGURE_OPTS="\
 %if 0%{?rhel} >= 7
        --with-arch=z196 --with-tune=zEC12 --enable-decimal-float \
 %else
+%if 0%{?fedora} >= 26
+       --with-arch=zEC12 --with-tune=z13 --enable-decimal-float \
+%else
        --with-arch=z9-109 --with-tune=z10 --enable-decimal-float \
 %endif
 %endif
+%endif
 %ifarch armv7hl
        --with-tune=cortex-a8 --with-arch=armv7-a \
        --with-float=hard --with-fpu=vfpv3-d16 --with-abi=aapcs-linux \

Comment 7 Carlos O'Donell 2017-02-02 14:55:55 UTC
The glibc testing results look good.

I've pushed a new Fedora Rawhide build which uses '-march=zEC12 -mtune=z13'.

commit 7061f7271540b413b1ba64a9d841320efe00a025
Author: Carlos O'Donell <carlos@systemhalted.org>
Date:   Thu Feb 2 09:53:07 2017 -0500

    glibc-2.24.90-30
    
    - Optimize IBM z System builds for zEC12.

The builds should arrive in rawhide shortly.

Comment 8 Dan Horák 2017-02-02 15:36:13 UTC
- redhat-rpm-config has been updated with
http://pkgs.fedoraproject.org/cgit/rpms/redhat-rpm-config.git/commit/?id=4914809dca206e1016d45a0c8a4b8424beb4ad80
- gcc will switch to the defaults in the next build
- kernel will follow asap

Comment 9 Dan Horák 2017-02-02 17:20:20 UTC
https://s390.koji.fedoraproject.org/koji/taskinfo?taskID=2459286 is a test zEC12+ kernel


Note You need to log in before you can comment on or make changes to this bug.