public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/llvm] rawhide: Set compiler defaults to match OS baselines
@ 2026-06-30 14:50 Yaakov Selkowitz
  0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-06-30 14:50 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/llvm
            Branch : rawhide
            Commit : 3c0e21955e06f17e96390f8d6a5852adada6c39a
            Author : Yaakov Selkowitz <yselkowi@redhat.com>
            Date   : 2026-06-26T13:24:24-04:00
            Stats  : +43/-0 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/llvm/c/3c0e21955e06f17e96390f8d6a5852adada6c39a?branch=rawhide

            Log:
            Set compiler defaults to match OS baselines

This corresponds to the settings in GCC for when clang is used outside of
package building.

Resolves: rhbz#1952630

---
diff --git a/llvm.spec b/llvm.spec
index 78ddf57..e241abc 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -1538,6 +1538,49 @@ cd llvm/utils/lit
 %global cfg_file_content %{gcc_triple}
 %global cfg_file_content_flang %{gcc_triple}
 
+%ifarch ppc64le
+%if 0%{?rhel} >= 10
+%global cfg_file_content %{cfg_file_content} -mcpu=power9 -mtune=power10
+%else
+%if 0%{?rhel} >= 9
+%global cfg_file_content %{cfg_file_content} -mcpu=power9 -mtune=power9
+%else
+# Fedora, RHEL 8
+%global cfg_file_content %{cfg_file_content} -mcpu=power8 -mtune=power8
+%endif
+%endif
+%endif
+
+%ifarch s390x
+%if 0%{?rhel} >= 11 || 0%{?fedora} >= 45
+%global cfg_file_content %{cfg_file_content} -march=z15 -mtune=z17
+%else
+%if 0%{?rhel} >= 10
+%global cfg_file_content %{cfg_file_content} -march=z14 -mtune=z16
+%else
+%if 0%{?rhel} >= 9
+%global cfg_file_content %{cfg_file_content} -march=z14 -mtune=z15
+%else
+# Fedora 44 and earlier, RHEL 8
+%global cfg_file_content %{cfg_file_content} -march=z13 -mtune=z14
+%endif
+%endif
+%endif
+%endif
+
+%ifarch x86_64
+%if 0%{?rhel} >= 10
+%global cfg_file_content %{cfg_file_content} -march=x86-64-v3
+%else
+%if 0%{?rhel} >= 9
+%global cfg_file_content %{cfg_file_content} -march=x86-64-v2
+%else
+# Fedora, RHEL 8
+%global cfg_file_content %{cfg_file_content} -march=x86-64
+%endif
+%endif
+%endif
+
 # We want to use DWARF-5 on all snapshot builds.
 %if %{without snapshot_build} && %{defined rhel} && 0%{?rhel} < 10
 %global cfg_file_content %{cfg_file_content} -gdwarf-4 -g0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-30 14:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-30 14:50 [rpms/llvm] rawhide: Set compiler defaults to match OS baselines Yaakov Selkowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox