clang seems to default to z10, should that be bumped to z13?

Bug #1864226 reported by Dimitri John Ledkov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
High
bugproxy
llvm-toolchain-10 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

clang seems to default to z10, should that be bumped to z13?

std::string systemz::getSystemZTargetCPU(const ArgList &Args) {
  if (const Arg *A = Args.getLastArg(clang::driver::options::OPT_march_EQ)) {
    llvm::StringRef CPUName = A->getValue();

    if (CPUName == "native") {
      std::string CPU = llvm::sys::getHostCPUName();
      if (!CPU.empty() && CPU != "generic")
        return CPU;
      else
        return "";
    }

    return CPUName;
  }
  return "z10";
}

Unless march was specified, it seems like clang defaults to z10, should that be bumped to z13?

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: New → Triaged
importance: Undecided → High
assignee: nobody → bugproxy (bugproxy)
tags: added: reverse-proxy-bugzilla s390x
bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-184033 severity-high targetmilestone-inin1804
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-02-25 13:14 EDT-------
In general, it would indeed make sense to have the clang package provided by the distro default to the same architecture level as the gcc package.

However, unlike GCC, there doesn't seem to be a way to specify a default architecture level at build time of clang, so I'm not sure how to go about that.

We certainly wouldn't want to change the default in upstream clang source code generally, that might be surprising to other users.

Are you setting default architecture levels in clang on other platforms? How do you do that? I'd be OK with doing the same on Z.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Well, I am a champion for s390x on Ubuntu, thus I want s390x to be the best Ubuntu port. So I'll just make a patch to be able to tweak minimum target arch, thus making Ubuntu llvm-toolchain-10 the best one out there =)

Revision history for this message
Dimitri John Ledkov (xnox) wrote :
bugproxy (bugproxy)
tags: added: targetmilestone-inin2004
removed: targetmilestone-inin1804
Revision history for this message
Oibaf (oibaf) wrote :

Looks fixed with:

llvm-toolchain-10 (1:10.0.0-1ubuntu1) focal; urgency=medium

  * s390x: set default abi to z196 for debian, and z13 for ubuntu.
    LP: #1864226

 -- Dimitri John Ledkov <email address hidden> Thu, 26 Mar 2020 12:47:05 +0000

Changed in llvm-toolchain-10 (Ubuntu):
status: New → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Triaged → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2020-03-27 05:32 EDT-------
IBM Bugzilla status-> closed, Fix Released with focal

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

@Oibaf

Bugs are normally closed automatically, when the packages that mention them migrate from proposed pocket to release or updates pockets. This package has not yet migrated, thus is not yet part of Focal.

Please do not close bugs manually, when the package is only in -proposed.

Changed in llvm-toolchain-10 (Ubuntu):
status: Fix Released → In Progress
Changed in ubuntu-z-systems:
status: Fix Released → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package llvm-toolchain-10 - 1:10.0.0-1ubuntu1

---------------
llvm-toolchain-10 (1:10.0.0-1ubuntu1) focal; urgency=medium

  * s390x: set default abi to z196 for debian, and z13 for ubuntu.
    LP: #1864226

 -- Dimitri John Ledkov <email address hidden> Thu, 26 Mar 2020 12:47:05 +0000

Changed in llvm-toolchain-10 (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-z-systems:
status: In Progress → Fix Released
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

After a few fixups, the change got accepted to clang upstream at https://reviews.llvm.org/D75914

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.