Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rocm-compilersupport for
openSUSE:Factory checked in at 2026-09-21 14:29:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rocm-compilersupport (Old)
and /work/SRC/openSUSE:Factory/.rocm-compilersupport.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rocm-compilersupport"
Mon Sep 21 14:29:18 2026 rev:2 rq:1378486 version:22
Changes:
--------
---
/work/SRC/openSUSE:Factory/rocm-compilersupport/rocm-compilersupport.changes
2025-08-26 14:57:03.582546888 +0200
+++
/work/SRC/openSUSE:Factory/.rocm-compilersupport.new.383539/rocm-compilersupport.changes
2026-09-21 14:29:37.744657619 +0200
@@ -1,0 +2,163 @@
+Thu Jul 16 00:00:00 UTC 2026 - Fedora Release Engineering
<[email protected]>
+
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
+- Add preview 7.14 patch: 0001-clang-23-link-libamdhip64.patch
+- Add preview 7.14 patch: 0001-preview-comgr-link-with-static-llvm.patch
+
+-------------------------------------------------------------------
+Mon May 18 00:00:00 UTC 2026 - Tom Rix <[email protected]>
+
+- Check version of rocminfo is recent enough
+
+-------------------------------------------------------------------
+Thu May 7 00:00:00 UTC 2026 - Tom Rix <[email protected]>
+
+- Add conflicts for rocm-compilersupport-macros
+
+-------------------------------------------------------------------
+Thu Apr 30 00:00:00 UTC 2026 - Tom Rix <[email protected]>
+
+- Merge rocm-compilersupport7.2 changes back
+
+-------------------------------------------------------------------
+Fri Apr 24 00:00:00 UTC 2026 - Tom Rix <[email protected]>
+
+- use suse ldconfig_scriptlets
+- move clang-tidy include dir to filesystem package
+- add static provides for clang runtime
+- Break down amd/ licenses
+- Obsolete libcxx
+- Install license files in more packages
+
+-------------------------------------------------------------------
+Wed Mar 25 00:00:00 UTC 2026 - Tom Rix <[email protected]>
+
+- Reduce build diskspace pressure
+
+-------------------------------------------------------------------
+Tue Mar 24 00:00:00 UTC 2026 - Tom Rix <[email protected]>
+
+- Update to 7.2.1
+
+-------------------------------------------------------------------
+Mon Mar 16 00:00:00 UTC 2026 - Tom Rix <[email protected]>
+
+- Change define to global build dirs
+- Fix dangling symlinks
+- Fix whitespace
+- Fix py3 shebangs
+- Fix dir ownships
+
+-------------------------------------------------------------------
+Sat Mar 14 00:00:00 UTC 2026 - Tom Rix <[email protected]>
+
+- Move building libc++ to --with libcxx option
+- llvm filesystem requires rocm filesystem
+- suse use ldconfig
+- add static provides
+
+-------------------------------------------------------------------
+Wed Mar 4 00:00:00 UTC 2026 - Tom Rix <[email protected]>
+
+- Change --with gitcommit to --with preview
+
+-------------------------------------------------------------------
+Mon Feb 16 00:00:00 UTC 2026 - Tom Rix <[email protected]>
+
+- Fix build on TW
+- Fix dir ownership of clang-analyzer
+ Add: 0001-SemaConcept.cpp-fix-MSVC-not-all-control-paths-retur.patch
+
+-------------------------------------------------------------------
+Thu Feb 12 00:00:00 UTC 2026 - Tom Rix <[email protected]>
+
+- hipcc requires rocminfo to find its default gpu
+
+-------------------------------------------------------------------
+Thu Feb 5 00:00:00 UTC 2026 - Tom Rix <[email protected]>
+
+- Update to 7.2.0
+- Use rocm-filesystem via rocm-cmake
+- Modify: 0001-rocm-llvm-work-around-new-assert-in-array.patch
+ 0001-comgr-link-with-static-llvm.patch
+
+-------------------------------------------------------------------
+Sat Jan 17 00:00:00 UTC 2026 - Fedora Release Engineering
<[email protected]>
+
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
+
+-------------------------------------------------------------------
+Mon Jan 12 00:00:00 UTC 2026 - Tom Rix <[email protected]>
+
+- Improve requires for static analysis
+
+-------------------------------------------------------------------
+Tue Jan 6 00:00:00 UTC 2026 - Tom Rix <[email protected]>
+
+- Turn on static analysis
+
+-------------------------------------------------------------------
+Sun Dec 14 00:00:00 UTC 2025 - Tom Rix <[email protected]>
+
+- Add --with compat
+
+-------------------------------------------------------------------
+Tue Dec 9 00:00:00 UTC 2025 - Tom Rix <[email protected]>
+
+- Change llvm_version_suffix to .rocm
+- Remove lld-wasm
+ Remove: 0001-Replace-use-of-mktemp-with-mkstemp.patch
+ 0001-Remove-err_drv_duplicate_config-check.patch
+
+-------------------------------------------------------------------
+Wed Nov 26 00:00:00 UTC 2025 - Tom Rix <[email protected]>
+
+- Update to 7.1.1
+ Add: 0001-lld-workaround-.gnu.version-change.patch
+
+-------------------------------------------------------------------
+Thu Nov 13 00:00:00 UTC 2025 - Tom Rix <[email protected]>
+
+- Rebuild
+
+-------------------------------------------------------------------
+Thu Oct 30 00:00:00 UTC 2025 - Tom Rix <[email protected]>
+
+- Update to 7.1.0
+
+-------------------------------------------------------------------
+Fri Oct 10 00:00:00 UTC 2025 - Tom Rix <[email protected]>
+
+- Update to 7.0.2
+
+-------------------------------------------------------------------
+Mon Oct 6 00:00:00 UTC 2025 - Tom Rix <[email protected]>
+
+- Adjust array workaround for RHEL 10.2
+
+-------------------------------------------------------------------
+Thu Sep 18 00:00:00 UTC 2025 - Tom Rix <[email protected]>
+
+- Add base llvm license
+- Force hip runtime detection
+ Add: 0001-rocm-compilersupport-force-hip-runtime-detection.patch
+ 0001-rocm-compilersupport-simplify-use-runtime-wrapper-ch.patch
+
+-------------------------------------------------------------------
+Tue Sep 16 00:00:00 UTC 2025 - Tom Rix <[email protected]>
+
+- Update to 7.0.0
+- Remove --with perl
+- Remove: b0baa1d8bd68a2ce2f7c5f2b62333e410e9122a1.patch
+
+-------------------------------------------------------------------
+Wed Aug 27 00:00:00 UTC 2025 - Tom Rix <[email protected]>
+
+- Add Fedora copyright
+
+-------------------------------------------------------------------
+Mon Aug 25 00:00:00 UTC 2025 - Tom Rix <[email protected]>
+
+- Simplify file removal
+
+-------------------------------------------------------------------
@@ -80,0 +244 @@
+ Add: b0baa1d8bd68a2ce2f7c5f2b62333e410e9122a1.patch
@@ -90,0 +255 @@
+ Add: 0001-rocm-llvm-work-around-new-assert-in-array.patch
@@ -172,0 +338 @@
+ Add: 0001-comgr-link-with-static-llvm.patch
Old:
----
0001-Remove-err_drv_duplicate_config-check.patch
0001-Replace-use-of-mktemp-with-mkstemp.patch
b0baa1d8bd68a2ce2f7c5f2b62333e410e9122a1.patch
rocm-compilersupport-6.4.2.tar.gz
New:
----
0001-SemaConcept.cpp-fix-MSVC-not-all-control-paths-retur.patch
0001-clang-23-link-libamdhip64.patch
0001-lld-workaround-.gnu.version-change.patch
0001-preview-comgr-link-with-static-llvm.patch
0001-rocm-compilersupport-force-hip-runtime-detection.patch
0001-rocm-compilersupport-simplify-use-runtime-wrapper-ch.patch
rocm-compilersupport-7.2.1.tar.gz
----------(Old B)----------
Old: Remove: 0001-Replace-use-of-mktemp-with-mkstemp.patch
0001-Remove-err_drv_duplicate_config-check.patch
Old:- Remove lld-wasm
Remove: 0001-Replace-use-of-mktemp-with-mkstemp.patch
0001-Remove-err_drv_duplicate_config-check.patch
Old:- Remove --with perl
- Remove: b0baa1d8bd68a2ce2f7c5f2b62333e410e9122a1.patch
----------(Old E)----------
----------(New B)----------
New:- Fix dir ownership of clang-analyzer
Add: 0001-SemaConcept.cpp-fix-MSVC-not-all-control-paths-retur.patch
New:- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
- Add preview 7.14 patch: 0001-clang-23-link-libamdhip64.patch
- Add preview 7.14 patch: 0001-preview-comgr-link-with-static-llvm.patch
New:- Update to 7.1.1
Add: 0001-lld-workaround-.gnu.version-change.patch
New:- Add preview 7.14 patch: 0001-clang-23-link-libamdhip64.patch
- Add preview 7.14 patch: 0001-preview-comgr-link-with-static-llvm.patch
New:- Force hip runtime detection
Add: 0001-rocm-compilersupport-force-hip-runtime-detection.patch
0001-rocm-compilersupport-simplify-use-runtime-wrapper-ch.patch
New: Add: 0001-rocm-compilersupport-force-hip-runtime-detection.patch
0001-rocm-compilersupport-simplify-use-runtime-wrapper-ch.patch
----------(New E)----------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rocm-compilersupport.spec ++++++
--- /var/tmp/diff_new_pack.xb7Hgb/_old 2026-09-21 14:29:42.606861145 +0200
+++ /var/tmp/diff_new_pack.xb7Hgb/_new 2026-09-21 14:29:42.609861270 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rocm-compilersupport
#
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -14,33 +14,103 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+# Copyright Fedora Project Authors.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+%bcond_with preview
+%if %{with preview}
+%global rocm_release 7.14
+%global rocm_patch 0
+%global pkg_src therock-%{rocm_release}
+%else
+%global rocm_release 7.2
+%global rocm_patch 1
+%global pkg_src rocm-%{rocm_release}.%{rocm_patch}
+%endif
+
+# The package follows LLVM's major version, but API version is still important:
%global comgr_maj_api_ver 3
+# What LLVM is upstream using (use LLVM_VERSION_MAJOR from
llvm/CMakeLists.txt):
+%if %{with preview}
+%global llvm_maj_ver 23
+%else
+%global llvm_maj_ver 22
+%endif
+%global llvm_version_suffix .rocm
+
# local, fedora
%global _comgr_full_api_ver %{comgr_maj_api_ver}.0
# mock, suse
%global comgr_full_api_ver %{comgr_maj_api_ver}.0.0
-# Upstream tags are based on rocm releases:
-%global rocm_release 6.4
-%global rocm_patch 2
%global rocm_version %{rocm_release}.%{rocm_patch}
-# What LLVM is upstream using (use LLVM_VERSION_MAJOR from
llvm/CMakeLists.txt):
-%global llvm_maj_ver 19
%global upstreamname llvm-project
%global toolchain clang
%global _smp_mflags %{nil}
%global _lto_cflags %{nil}
-%global bundle_prefix %{_libdir}/rocm/llvm
%global llvm_triple %{_target_platform}
-%global amd_device_libs_prefix lib64/rocm/llvm/lib/clang/%{llvm_maj_ver}
# Compression type and level for source/binary package payloads.
# "w7T0.xzdio" xz level 7 using %%{getncpus} threads
-%global _source_payload w7T0.xzdio
-%global _binary_payload w7T0.xzdio
+# T0 (auto detect) can fail if cores are high and memory low
+# Use 6 threads, between OpenSUSE (4) and Fedora (8) build system defaults
+%global _source_payload w7T6.xzdio
+%global _binary_payload w7T6.xzdio
+
+%bcond_with compat
+%if %{with compat}
+%global amd_device_libs_prefix
%{_libdir}/rocm/rocm-%{rocm_release}/llvm/lib/clang/%{llvm_maj_ver}/lib
+%global bundle_prefix %{_libdir}/rocm/rocm-%{rocm_release}/llvm
+%global pkg_libdir lib
+%global pkg_libdir_suffix %{nil}
+%global pkg_prefix %{_prefix}/lib64/rocm/rocm-%{rocm_release}
+%global pkg_suffix %{rocm_release}
+%else
+%global amd_device_libs_prefix
%{_libdir}/rocm/llvm/lib/clang/%{llvm_maj_ver}/lib
+%global bundle_prefix %{_libdir}/rocm/llvm
+%global pkg_libdir %{_lib}
+%global pkg_libdir_suffix %{nil}
+%global pkg_prefix %{_prefix}
+%global pkg_suffix %{nil}
+%endif
+%global device_libs_name rocm-device-libs%{pkg_suffix}
+%global hipcc_name hipcc%{pkg_suffix}
+%global pkg_name rocm-compilersupport%{pkg_suffix}
+%global rocm_clang_analyzer_name rocm-clang-analyzer%{pkg_suffix}
+%global rocm_clang_name rocm-clang%{pkg_suffix}
+%global rocm_clang_tools_extra_name rocm-clang-tools-extra%{pkg_suffix}
+%global rocm_libcxx_name rocm-libc++%{pkg_suffix}
+%global rocm_lld_name rocm-lld%{pkg_suffix}
+%global rocm_llvm_name rocm-llvm%{pkg_suffix}
+%global rocm_omp_name rocm-omp%{pkg_suffix}
+%if 0%{?suse_version}
+# 15.6
+# rocm-comgr.x86_64: E: shlib-policy-name-error (Badness: 10000) libamd_comgr2
+# Your package contains a single shared library but is not named after its
SONAME.
+%global comgr_name libamd_comgr3%{pkg_suffix}
+%else
+%global comgr_name rocm-comgr%{pkg_suffix}
+%endif
%bcond_with debug
%if %{with debug}
@@ -49,45 +119,104 @@
%global build_type RelWithDebInfo
%endif
-# Older hipcc was perl, it has been deprecated
-%bcond_with perl
# Enable ppc and aarch64 builds
%bcond_with alt_arch
-Name: rocm-compilersupport
+# buid the static analyzer
+%bcond_without sa
+%if %{with sa}
+%global build_sa ON
+%else
+%global build_sa OFF
+%endif
+
+# build gold plugin
+%bcond_without gold
+%if %{with gold}
+%global build_gold ON
+%else
+%global build_gold OFF
+%endif
+
+%bcond_with libcxx
+%if %{with libcxx}
+%global build_libcxx ON
+%else
+%global build_libcxx OFF
+%endif
+
+Name: %{pkg_name}
Version: %{llvm_maj_ver}
-Release: 15.rocm%{rocm_version}%{?dist}
+%if %{with preview}
+Release: 1001.rocm%{rocm_version}%{?dist}
+%else
+Release: 13.rocm%{rocm_version}%{?dist}
+%endif
+
Summary: Various AMD ROCm LLVM related services
%if 0%{?suse_version}
Group: Development/Languages/Other
%endif
URL: https://github.com/ROCm/llvm-project
-# hipcc is MIT, comgr and device-libs are NCSA:
-License: MIT AND NCSA
-Source0:
https://github.com/ROCm/%{upstreamname}/archive/refs/tags/rocm-%{rocm_version}.tar.gz#/%{name}-%{rocm_version}.tar.gz
+License: (Apache-2.0 WITH LLVM-exception OR NCSA) AND NCSA AND MIT
+# llvm is Apache-2.0 WITH LLVM-exception OR NCSA
+# /amd breakdown
+#
+# /amd/comgr/*
+# Apache-2.0, amd/comgr/LICENSE.txt
+#
+# /amd/hipcc/*
+# MIT, amd/hipcc/LICENSE.txt
+#
+# /amd/device-libs/*
+# NSCA, amd/device-libs/LICENSE.TXT
+
+Source0:
%{url}/archive/refs/tags/%{pkg_src}.tar.gz#/rocm-compilersupport-%{rocm_version}.tar.gz
Source1: rocm-compilersupport.prep.in
-Patch3: 0001-Remove-err_drv_duplicate_config-check.patch
-Patch4: 0001-Replace-use-of-mktemp-with-mkstemp.patch
-# Subject: [PATCH] [gold] Fix compilation (#130334)
-Patch5: %{url}/commit/b0baa1d8bd68a2ce2f7c5f2b62333e410e9122a1.patch
+%if %{without preview}
# Link comgr with static versions of llvm's libraries
-Patch6: 0001-comgr-link-with-static-llvm.patch
-
-Patch8: 0001-rocm-llvm-work-around-new-assert-in-array.patch
+Patch1: 0001-comgr-link-with-static-llvm.patch
+%else
+Patch1: 0001-preview-comgr-link-with-static-llvm.patch
+%endif
+# On Fedora the assert came in gcc 15, on RHEL 10.2 gcc 14
+# Reduce the gcc version check below
+Patch2: 0001-rocm-llvm-work-around-new-assert-in-array.patch
+# https://github.com/ROCm/llvm-project/issues/301
+Patch3: 0001-rocm-compilersupport-force-hip-runtime-detection.patch
+Patch4: 0001-rocm-compilersupport-simplify-use-runtime-wrapper-ch.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=2415065
+Patch5: 0001-lld-workaround-.gnu.version-change.patch
+%if %{without preview}
+# backport
+#
https://github.com/ROCm/llvm-project/commit/23f010f1ab09263d79027c70d5f4cddfe0055ca9
+Patch6: 0001-SemaConcept.cpp-fix-MSVC-not-all-control-paths-retur.patch
+%endif
+%if %{with preview}
+# When clang bungles the rocm install path, it gets the linking of libamdhip64
wrong
+# Convert from an absolute path <path-to>/libamdhip64.so to using -lamdhip64
+Patch7: 0001-clang-23-link-libamdhip64.patch
+%endif
BuildRequires: cmake
-BuildRequires: perl
%if 0%{?fedora} || 0%{?suse_version}
BuildRequires: fdupes
%endif
-BuildRequires: binutils-devel
-BuildRequires: gcc-c++
BuildRequires: libffi-devel
BuildRequires: libzstd-devel
-BuildRequires: rocm-cmake
+BuildRequires: rocm-cmake%{pkg_suffix}
+BuildRequires: rocm-filesystem%{pkg_suffix}
BuildRequires: zlib-devel
+%if %{with gold}
+BuildRequires: binutils-devel
+%endif
+BuildRequires: gcc-c++
+%if %{with preview}
+# For omp
+BuildRequires: python-devel
+%endif
Provides: bundled(llvm-project) = %{llvm_maj_ver}
%if 0%{?rhel} || 0%{?suse_version}
@@ -118,16 +247,25 @@
Summary: ROCm Compiler RPM macros
BuildArch: noarch
+Requires: rpm
+# Compat version of macros conflict with the normal version
+%if %{with compat}
+Conflicts: rocm-compilersupport-macros
+%else
+Conflicts: rocm-compilersupport7.2-macros
+%endif
+
%description macros
This package contains ROCm compiler related RPM macros.
-%package -n rocm-device-libs
+%package -n %{device_libs_name}
Summary: AMD ROCm LLVM bit code libraries
-Requires: rocm-clang-devel
-Requires: rocm-lld
-Requires: rocm-llvm-static
+Requires: %{rocm_clang_name}-devel = %{version}-%{release}
+Requires: %{rocm_llvm_name}-filesystem = %{version}-%{release}
+Requires: %{rocm_llvm_name}-static = %{version}-%{release}
+Requires: rocm-lld%{pkg_suffix} = %{version}-%{release}
-%description -n rocm-device-libs
+%description -n %{device_libs_name}
This package contains a set of AMD specific device-side language runtime
libraries in the form of bit code. Specifically:
- Open Compute library controls
@@ -137,203 +275,268 @@
- HIP built-in library
- Heterogeneous Compute built-in library
-
-%if 0%{?suse_version}
-# 15.6
-# rocm-comgr.x86_64: E: shlib-policy-name-error (Badness: 10000) libamd_comgr2
-# Your package contains a single shared library but is not named after its
SONAME.
-%global comgr_name libamd_comgr3
-%else
-%global comgr_name rocm-comgr
-%endif
-
%package -n %{comgr_name}
Summary: AMD ROCm LLVM Code Object Manager
-Provides: rocm-comgr = %{comgr_full_api_ver}-%{release}
-Provides: comgr(major) = %{comgr_maj_api_ver}
+Requires: rocm-filesystem%{pkg_suffix}
+Provides: rocm-comgr%{pkg_suffix} = %{comgr_full_api_ver}-%{release}
+Provides: comgr%{pkg_suffix}(major) = %{comgr_maj_api_ver}
%description -n %{comgr_name}
The AMD Code Object Manager (Comgr) is a shared library which provides
operations for creating and inspecting code objects.
-%post -n %{comgr_name} -p /sbin/ldconfig
-%postun -n %{comgr_name} -p /sbin/ldconfig
+%if 0%{?suse_version}
+%ldconfig_scriptlets -n %{comgr_name}
+%endif
%package -n %{comgr_name}-devel
Summary: AMD ROCm LLVM Code Object Manager
Requires: %{comgr_name}%{?_isa} = %{version}-%{release}
-Requires: rocm-device-libs
+Requires: %{device_libs_name} = %{version}-%{release}
%if 0%{?suse_version}
-Provides: rocm-comgr-devel = %{version}-%{release}
+Provides: rocm-comgr%{pkg_suffix}-devel = %{version}-%{release}
%endif
%description -n %{comgr_name}-devel
The AMD Code Object Manager (Comgr) development package.
-%package -n hipcc
+%package -n %{hipcc_name}
Summary: HIP compiler driver
-Requires: perl-base
-Requires: rocm-device-libs = %{version}-%{release}
-Suggests: rocminfo
+Requires: %{device_libs_name} = %{version}-%{release}
+Requires: rocm-filesystem%{pkg_suffix}
+Requires: rocminfo%{pkg_suffix} >= %{rocm_release}
%if 0%{?suse_version}
Provides: hip = %{version}-%{release}
Obsoletes: hip <= %{version}-%{release}
%endif
-%description -n hipcc
-hipcc is a compiler driver utility that will call clang or nvcc, depending on
-target, and pass the appropriate include and library options for the target
-compiler and HIP infrastructure.
-
+%description -n %{hipcc_name}
hipcc will pass-through options to the target compiler. The tools calling hipcc
must ensure the compiler options are appropriate for the target compiler.
-%package -n hipcc-libomp-devel
-Summary: OpenMP header files for hipcc
-Requires: hipcc = %{version}-%{release}
-Requires: libomp-devel
-
-%description -n hipcc-libomp-devel
-OpenMP header files compatible with HIPCC.
-
# ROCM LLVM
-%package -n rocm-llvm-filesystem
+%package -n %{rocm_llvm_name}-filesystem
Summary: Filesystem package that owns the rocm llvm directory
+Requires: rocm-filesystem%{pkg_suffix}
-%description -n rocm-llvm-filesystem
+%description -n %{rocm_llvm_name}-filesystem
This package owns the rocm llvm directory : %{bundle_prefix}
-%package -n rocm-llvm-libs
+%package -n %{rocm_llvm_name}-libs
Summary: The ROCm LLVM lib
-Requires: rocm-libc++%{?_isa} = %{version}-%{release}
-Requires: rocm-llvm-filesystem%{?_isa} = %{version}-%{release}
+Requires: %{rocm_llvm_name}-filesystem = %{version}-%{release}
+%if %{with libcxx}
+Requires: %{rocm_libcxx_name}%{?_isa} = %{version}-%{release}
+%endif
-%description -n rocm-llvm-libs
+%description -n %{rocm_llvm_name}-libs
%{summary}
-%package -n rocm-llvm
+%package -n %{rocm_llvm_name}
Summary: The ROCm LLVM
-Requires: rocm-llvm-libs%{?_isa} = %{version}-%{release}
+Requires: %{rocm_llvm_name}-filesystem = %{version}-%{release}
+Requires: %{rocm_llvm_name}-libs%{?_isa} = %{version}-%{release}
+Requires: rocm-filesystem%{pkg_suffix}
# https://bugzilla.redhat.com/show_bug.cgi?id=2362780
# /usr/lib64/rocm/llvm/bin/amdgpu-arch
# Failed to 'dlopen' libhsa-runtime64.so
-Recommends: rocm-runtime-devel
+Recommends: rocm-runtime%{pkg_suffix}-devel
-%description -n rocm-llvm
+%description -n %{rocm_llvm_name}
%{summary}
-%package -n rocm-llvm-devel
+%package -n %{rocm_llvm_name}-devel
Summary: Libraries and header files for ROCm LLVM
-Requires: rocm-llvm%{?_isa} = %{version}-%{release}
+Requires: %{rocm_llvm_name}%{?_isa} = %{version}-%{release}
+Requires: %{rocm_llvm_name}-devel%{?_isa} = %{version}-%{release}
+Requires: %{rocm_llvm_name}-filesystem = %{version}-%{release}
+Requires: rocm-filesystem%{pkg_suffix}
Requires: zlib-devel
-%description -n rocm-llvm-devel
+%description -n %{rocm_llvm_name}-devel
%{summary}
-%post -n rocm-llvm-devel -p /sbin/ldconfig
-%postun -n rocm-llvm-devel -p /sbin/ldconfig
+%if 0%{?suse_version}
+%ldconfig_scriptlets -n %{rocm_llvm_name}-devel
+%endif
-%package -n rocm-llvm-static
+%package -n %{rocm_llvm_name}-static
Summary: Static libraries for ROCm LLVM
-Requires: rocm-llvm-devel%{?_isa} = %{version}-%{release}
+Requires: %{rocm_llvm_name}-devel%{?_isa} = %{version}-%{release}
+Requires: %{rocm_llvm_name}-filesystem = %{version}-%{release}
+Provides: %{rocm_llvm_name}-static = %{version}-%{release}
-%description -n rocm-llvm-static
+%description -n %{rocm_llvm_name}-static
%{summary}
# ROCM CLANG
-%package -n rocm-clang-libs
+%package -n %{rocm_clang_name}-libs
Summary: The ROCm compiler libs
-Requires: rocm-llvm-libs%{?_isa} = %{version}-%{release}
+Requires: %{rocm_llvm_name}-filesystem = %{version}-%{release}
+Requires: %{rocm_llvm_name}-libs%{?_isa} = %{version}-%{release}
+Requires: rocm-filesystem%{pkg_suffix}
-%description -n rocm-clang-libs
+%description -n %{rocm_clang_name}-libs
%{summary}
-%post -n rocm-clang-libs -p /sbin/ldconfig
-%postun -n rocm-clang-libs -p /sbin/ldconfig
+%if 0%{?suse_version}
+%ldconfig_scriptlets -n %{rocm_clang_name}-libs
+%endif
-%package -n rocm-clang-runtime-devel
+%package -n %{rocm_clang_name}-runtime-devel
Summary: The ROCm compiler runtime
+Requires: %{rocm_llvm_name}-filesystem = %{version}-%{release}
+Provides: %{rocm_clang_name}-runtime-static = %{version}-%{release}
-%description -n rocm-clang-runtime-devel
+%description -n %{rocm_clang_name}-runtime-devel
%{summary}
-%package -n rocm-clang
+%package -n %{rocm_clang_name}
Summary: The ROCm compiler
+Requires: %{rocm_clang_name}-libs%{?_isa} = %{version}-%{release}
+Requires: %{rocm_clang_name}-runtime-static = %{version}-%{release}
+Requires: %{rocm_llvm_name}-filesystem = %{version}-%{release}
Requires: git
Requires: python3
-Requires: rocm-clang-libs%{?_isa} = %{version}-%{release}
-Requires: rocm-clang-runtime-devel%{?_isa} = %{version}-%{release}
-Requires: rocm-libc++-devel%{?_isa} = %{version}-%{release}
+%if %{with libcxx}
+Requires: %{rocm_libcxx_name}-devel%{?_isa} = %{version}-%{release}
+%endif
-%description -n rocm-clang
+%description -n %{rocm_clang_name}
%{summary}
-%package -n rocm-clang-devel
+%package -n %{rocm_clang_name}-devel
Summary: Libraries and header files for ROCm CLANG
-Requires: rocm-clang%{?_isa} = %{version}-%{release}
+Requires: %{rocm_clang_name}%{?_isa} = %{version}-%{release}
+Requires: %{rocm_llvm_name}-filesystem = %{version}-%{release}
-%description -n rocm-clang-devel
+%description -n %{rocm_clang_name}-devel
%{summary}
# CLANG TOOLS EXTRA
-%package -n rocm-clang-tools-extra
+%package -n %{rocm_clang_tools_extra_name}
Summary: Extra tools for clang
-Requires: rocm-clang-libs%{?_isa} = %{version}-%{release}
+Requires: %{rocm_llvm_name}-filesystem = %{version}-%{release}
+Requires: rocm-clang%{pkg_suffix}-libs%{?_isa} = %{version}-%{release}
-%description -n rocm-clang-tools-extra
+%description -n %{rocm_clang_tools_extra_name}
A set of extra tools built using Clang's tooling API.
-%package -n rocm-clang-tools-extra-devel
+%package -n %{rocm_clang_tools_extra_name}-devel
Summary: Development header files for clang tools
-Requires: rocm-clang-tools-extra = %{version}-%{release}
+Requires: %{rocm_clang_tools_extra_name} = %{version}-%{release}
+Requires: %{rocm_llvm_name}-filesystem = %{version}-%{release}
-%description -n rocm-clang-tools-extra-devel
+%description -n %{rocm_clang_tools_extra_name}-devel
Development header files for clang tools.
# ROCM LLD
-%package -n rocm-lld
+%package -n %{rocm_lld_name}
Summary: The ROCm Linker
-Requires: rocm-llvm-libs%{?_isa} = %{version}-%{release}
+Requires: %{rocm_llvm_name}-filesystem = %{version}-%{release}
+Requires: %{rocm_llvm_name}-libs%{?_isa} = %{version}-%{release}
-%description -n rocm-lld
+%description -n %{rocm_lld_name}
%{summary}
+%if %{with libcxx}
# ROCM LIBC++
-%package -n rocm-libc++
+%package -n %{rocm_libcxx_name}
Summary: The ROCm libc++
-Requires: rocm-llvm-filesystem%{?_isa} = %{version}-%{release}
+Requires: %{rocm_llvm_name}-filesystem = %{version}-%{release}
-%description -n rocm-libc++
+%description -n %{rocm_libcxx_name}
%{summary}
-%package -n rocm-libc++-devel
+%package -n %{rocm_libcxx_name}-devel
Summary: The ROCm libc++ libraries and headers
-Requires: rocm-libc++%{?_isa} = %{version}-%{release}
+Requires: %{rocm_libcxx_name}%{?_isa} = %{version}-%{release}
-%description -n rocm-libc++-devel
+%description -n %{rocm_libcxx_name}-devel
%{summary}
-%package -n rocm-libc++-static
+%package -n %{rocm_libcxx_name}-static
Summary: The ROCm libc++ static libraries
-Requires: rocm-libc++-devel%{?_isa} = %{version}-%{release}
+Requires: %{rocm_libcxx_name}-devel%{?_isa} = %{version}-%{release}
+
+%description -n %{rocm_libcxx_name}-static
+%{summary}
+
+%else
+Obsoletes: %{rocm_libcxx_name} <= %{version}-%{release}
+%endif
-%description -n rocm-libc++-static
+%if %{with sa}
+%package -n %{rocm_clang_analyzer_name}
+Summary: The ROCm code analysis framework
+Requires: %{rocm_clang_name} = %{version}-%{release}
+Requires: %{rocm_llvm_name}-filesystem = %{version}-%{release}
+# For scan-build
+Requires: perl(File::Copy)
+Requires: perl(File::Find)
+Requires: perl(FindBin)
+Requires: perl(Hash::Util)
+Requires: perl(Sys::Hostname)
+
+%description -n %{rocm_clang_analyzer_name}
+%{summary}
+%endif
+
+%if %{with preview}
+%package -n %{rocm_omp_name}-devel
+Summary: The ROCm OMP devel
+
+%description -n %{rocm_omp_name}-devel
%{summary}
+Requires: %{device_libs_name} = %{version}-%{release}
+Requires: rocm-filesystem%{pkg_suffix}
+
+Obsoletes: rocm-omp-devel <= 7.3
+
+%endif
+
%prep
-%autosetup -p1 -n %{upstreamname}-rocm-%{rocm_version}
+%autosetup -p1 -n %{upstreamname}-%{pkg_src}
+
+# Remove third-party
+#
+# Need SipHash.h
+# .../llvm/lib/Support/SipHash.cpp:15:10: fatal error: siphash/SipHash.h: No
such file or directory
+# 15 | #include "siphash/SipHash.h"
+# move siphash out of the way
+mv third-party/siphash .
+%if %{with preview}
+mv third-party/unittest .
+%endif
+# remove everything else
+rm -rf third-party/*
+# move siphash back
+mv siphash third-party/
+%if %{with preview}
+mv unittest third-party/
+%endif
# rm llvm-project bits we do not need
-rm -rf {bolt,flang,libc,libclc,lldb,llvm-libgcc,mlir,polly}
+rm -rf {bolt,flang,flang-rt,libclc,lldb,llvm-libgcc,mlir,polly}
#Force static linking of libclang in comgr
sed -i "s/TARGET clangFrontendTool/true/" amd/comgr/CMakeLists.txt
+# change version check of array assert work around
+%if 0%{?rhel}
+sed -i -e 's@#if _GLIBCXX_RELEASE >= 15@#if _GLIBCXX_RELEASE >= 11@'
clang/lib/Headers/cuda_wrappers/array
+%endif
+
+# Reduce diskspace pressure
+# There are a number of object files in clang/tests we will not be running
+find . \( -name '*.o' -o -name '*.a' \) -delete
+
install -pm 755 %{SOURCE1} prep.sh
-sed -i -e 's@%%{_prefix}@%{_prefix}@' prep.sh
-sed -i -e 's@%%{_lib}@%{_lib}@' prep.sh
+sed -i -e 's@%%{pkg_prefix}@%{pkg_prefix}@' prep.sh
+sed -i -e 's@%%{pkg_libdir}@%{pkg_libdir}@' prep.sh
sed -i -e 's@%%{amd_device_libs_prefix}@%{amd_device_libs_prefix}@' prep.sh
sed -i -e 's@%%{bundle_prefix}@%{bundle_prefix}@' prep.sh
grep -v '%%{' prep.sh
@@ -368,7 +571,21 @@
fi
%global llvm_projects "clang;clang-tools-extra;lld"
+%if %{with libcxx}
%global llvm_runtimes "compiler-rt;libcxx;libcxxabi"
+%else
+%if %{with preview}
+# rocm-omp is going away
+# CMake Error at CMakeLists.txt:24 (message):
+# The legacy standalone build mode has been removed. Please change
+# cmake <llvm-project>/openmp
+# to
+# cmake <llvm-project>/runtimes -DLLVM_ENABLE_RUNTIMES=openmp
+%global llvm_runtimes "compiler-rt;openmp"
+%else
+%global llvm_runtimes "compiler-rt"
+%endif
+%endif
p=$PWD
@@ -378,9 +595,11 @@
%global llvmrocm_cmake_config \\\
-DBUILD_SHARED_LIBS=OFF \\\
-DBUILD_TESTING=OFF \\\
- -DCLANG_ENABLE_STATIC_ANALYZER=OFF \\\
+ -DCLANG_ENABLE_STATIC_ANALYZER=%{build_sa} \\\
-DCLANG_ENABLE_ARCMT=OFF \\\
+ -DCLANG_ENABLE_CLANGD=OFF \\\
-DCLANG_TOOL_CLANG_FUZZER_BUILD=OFF \\\
+ -DCLANG_TOOL_C_INDEX_TEST_BUILD=OFF \\\
-DCMAKE_BUILD_TYPE=%{build_type} \\\
-DCMAKE_INSTALL_DO_STRIP=ON \\\
-DCMAKE_INSTALL_PREFIX=%{bundle_prefix} \\\
@@ -396,12 +615,22 @@
-DENABLE_LINKER_BUILD_ID=ON \\\
-DLIBCXX_INCLUDE_BENCHMARKS=OFF \\\
-DLIBCXXABI_USE_LLVM_UNWINDER=OFF \\\
+ -DLIBOMPTARGET_NVPTX_ENABLE_BCLIB=OFF \\\
+ -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="" \\\
+ -DLIBOMPTARGET_NVPTX_BC_LINKER="" \\\
+ -DLIBOMP_OMPD_GDB_SUPPORT=OFF \\\
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=ON \\\
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF \\\
+ -DLIBOMPTARGET_BUILD_DEVICERTL_BCLIB=ON \\\
+ -DLIBOMPTARGET_NVPTX_ENABLE_BCLIB=OFF \\\
+ -DLIBOMP_INSTALL_ALIASES=OFF \\\
+ -DLIBOMP_ARCHER_SUPPORT=OFF \\\
-DLLVM_BINUTILS_INCDIR=%{_includedir} \\\
-DLLVM_BUILD_RUNTIME=ON \\\
-DLLVM_DEFAULT_TARGET_TRIPLE=%{llvm_triple} \\\
-DLLVM_ENABLE_EH=ON \\\
-DLLVM_ENABLE_FFI=ON \\\
- -DLLVM_ENABLE_LIBCXX=ON \\\
+ -DLLVM_ENABLE_LIBCXX=%{build_libcxx} \\\
-DLLVM_ENABLE_OCAMLDOC=OFF \\\
-DLLVM_ENABLE_RTTI=ON \\\
-DLLVM_ENABLE_ZLIB=ON \\\
@@ -409,11 +638,13 @@
-DLLVM_INCLUDE_BENCHMARKS=OFF \\\
-DLLVM_INCLUDE_EXAMPLES=OFF \\\
-DLLVM_INCLUDE_TESTS=OFF \\\
+ -DLLVM_LIBDIR_SUFFIX=%{pkg_libdir_suffix} \\\
-DLLVM_TARGETS_TO_BUILD=%{targets_to_build} \\\
- -DLLVM_TOOL_GOLD_BUILD=ON \\\
+ -DLLVM_TOOL_GOLD_BUILD=%{build_gold} \\\
-DLLVM_TOOL_LLVM_AS_FUZZER_BUILD=OFF \\\
-DLLVM_TOOL_LLVM_DIS_FUZZER_BUILD=OFF \\\
-DLLVM_TOOL_LLVM_DLANG_DEMANGLE_FUZZER_BUILD=OFF \\\
+ -DLLVM_TOOL_LLVM_EXEGESIS_BUILD=OFF \\\
-DLLVM_TOOL_LLVM_ISEL_FUZZER_BUILD=OFF \\\
-DLLVM_TOOL_LLVM_ITANIUM_DEMANGLE_FUZZER_BUILD=OFF \\\
-DLLVM_TOOL_LLVM_MC_ASSEMBLE_FUZZER_BUILD=OFF \\\
@@ -425,6 +656,7 @@
-DLLVM_TOOL_LLVM_YAML_NUMERIC_PARSER_FUZZER_BUILD=OFF \\\
-DLLVM_TOOL_LLVM_YAML_PARSER_FUZZER_BUILD=OFF \\\
-DLLVM_TOOL_VFABI_DEMANGLE_FUZZER_BUILD=OFF \\\
+ -DLLVM_VERSION_SUFFIX=%{llvm_version_suffix} \\\
-DMLIR_INSTALL_AGGREGATE_OBJECTS=OFF \\\
-DLLVM_BUILD_LLVM_DYLIB=ON \\\
-DLLVM_LINK_LLVM_DYLIB=ON \\\
@@ -437,8 +669,8 @@
%define __sourcedir llvm
%define __builddir build-llvm
%else
-%define _vpath_srcdir llvm
-%define _vpath_builddir build-llvm
+%global _vpath_srcdir llvm
+%global _vpath_builddir build-llvm
%endif
# Mixing use of gcc and clang in the build conflicts with rpm's setting of
flags.
@@ -466,10 +698,15 @@
%if 0%{?suse_version}
%cmake_build -j ${JOBS}
+cd ..
%else
%make_build -C build-llvm -j ${JOBS}
%endif
+# Reduce diskspace pressure
+# Remove files that won't be needed anymore
+find build-llvm \( -name '*.o' -o -name '*.a' \) -delete
+
popd
build_stage1=$p/build-llvm
@@ -492,8 +729,8 @@
%define __sourcedir llvm
%define __builddir build-llvm-2
%else
-%define _vpath_srcdir llvm
-%define _vpath_builddir build-llvm-2
+%global _vpath_srcdir llvm
+%global _vpath_builddir build-llvm-2
%endif
export LD_LIBRARY_PATH=$PWD/build-llvm-2/lib
@@ -508,12 +745,13 @@
-DCLANG_DEFAULT_LINKER=lld \
-DLLVM_ENABLE_LLD=ON \
-DLLVM_TOOL_COMPILER_RT_BUILD=ON \
- -DLLVM_TOOL_LIBCXXABI_BUILD=ON \
- -DLLVM_TOOL_LIBCXX_BUILD=ON \
+ -DLLVM_TOOL_LIBCXXABI_BUILD=%{build_libcxx} \
+ -DLLVM_TOOL_LIBCXX_BUILD=%{build_libcxx} \
-DLLVM_ENABLE_PROJECTS=%{llvm_projects} \
-DLLVM_ENABLE_RUNTIMES=%{llvm_runtimes}
%cmake_build -j ${JOBS}
+
popd
build_stage2=$p/build-llvm-2
@@ -535,24 +773,22 @@
%define __sourcedir amd/device-libs
%define __builddir build-devicelibs
%else
-%define _vpath_srcdir amd/device-libs
-%define _vpath_builddir build-devicelibs
+%global _vpath_srcdir amd/device-libs
+%global _vpath_builddir build-devicelibs
%endif
%cmake \
%{llvmrocm_cmake_config} \
%{llvmrocm_tools_config} \
- -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DCMAKE_INSTALL_LIBDIR=%{_lib} \
-
-DROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW="%{amd_device_libs_prefix}/amdgcn" \
- -DROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_OLD=""
+ -DCMAKE_INSTALL_LIBDIR=%{pkg_libdir} \
+ -DCMAKE_INSTALL_PREFIX=%{amd_device_libs_prefix}
%cmake_build -j ${JOBS}
popd
build_devicelibs=$p/build-devicelibs
%global llvmrocm_devicelibs_config \\\
- -DAMDDeviceLibs_DIR=$build_devicelibs/%{_lib}/cmake/AMDDeviceLibs
+ -DAMDDeviceLibs_DIR=$build_devicelibs/%{pkg_libdir}/cmake/AMDDeviceLibs
#
# HIPCC
@@ -562,8 +798,8 @@
%define __sourcedir amd/hipcc
%define __builddir build-hipcc
%else
-%define _vpath_srcdir amd/hipcc
-%define _vpath_builddir build-hipcc
+%global _vpath_srcdir amd/hipcc
+%global _vpath_builddir build-hipcc
%endif
%cmake \
@@ -571,8 +807,8 @@
%{llvmrocm_tools_config} \
%{llvmrocm_devicelibs_config} \
-DCMAKE_INSTALL_RPATH=%{bundle_prefix}/lib \
- -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DCMAKE_INSTALL_LIBDIR=%{_lib} \
+ -DCMAKE_INSTALL_PREFIX=%{pkg_prefix} \
+ -DCMAKE_INSTALL_LIBDIR=%{pkg_libdir} \
-DCMAKE_SKIP_INSTALL_RPATH=OFF
%cmake_build -j ${JOBS}
@@ -586,8 +822,8 @@
%define __sourcedir amd/comgr
%define __builddir build-comgr
%else
-%define _vpath_srcdir amd/comgr
-%define _vpath_builddir build-comgr
+%global _vpath_srcdir amd/comgr
+%global _vpath_builddir build-comgr
%endif
%cmake -G "Unix Makefiles" \
@@ -595,24 +831,32 @@
%{llvmrocm_tools_config} \
%{llvmrocm_devicelibs_config} \
-DBUILD_SHARED_LIBS=ON \
- -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DCMAKE_INSTALL_LIBDIR=%{_lib}
+ -DCMAKE_INSTALL_PREFIX=%{pkg_prefix} \
+ -DCMAKE_INSTALL_LIBDIR=%{pkg_libdir}
# cmake produces a link.txt that includes libLLVM*.so, hack it out
%if 0%{?suse_version}
-sed -i -e '[email protected]@libLLVMCore.a@'
CMakeFiles/amd_comgr.dir/link.txt
+sed -i -e
'[email protected].%{llvm_maj_ver}.0%{llvm_version_suffix}@libLLVMCore.a@'
CMakeFiles/amd_comgr.dir/link.txt
# Order of link is wrong include some missing libs
sed -i -e 's@-lrt -lm@-lLLVMCoverage -lLLVMFrontendDriver -lLLVMFrontendHLSL
-lLLVMLTO -lLLVMOption -lLLVMSymbolize -lLLVMWindowsDriver -lrt -lm@'
CMakeFiles/amd_comgr.dir/link.txt
%else
-sed -i -e '[email protected]@libLLVMCore.a@'
build-comgr/CMakeFiles/amd_comgr.dir/link.txt
+sed -i -e
'[email protected].%{llvm_maj_ver}.0%{llvm_version_suffix}@libLLVMCore.a@'
build-comgr/CMakeFiles/amd_comgr.dir/link.txt
# Order of link is wrong include some missing libs
+%if %{with preview}
+# Remove libclang-cpp.so from link
+sed -i -e 's/[^ ]*libclang-cpp[^ ]*//g'
build-comgr/CMakeFiles/amd_comgr.dir/link.txt
+# Add libraries to cover the removal
+sed -i -e 's@-lrt -lm@-lclangSerialization -lclangAST -lclangDriver
-lclangScalableStaticAnalysisFrameworkAnalyses -lclangDependencyScanning
-lclangOptions -lclangFrontend -lclangFrontendTool
-lclangScalableStaticAnalysisFrameworkFrontend
-lclangScalableStaticAnalysisFrameworkCore -lclangExtractAPI -lclangInstallAPI
-lclangIndex -lclangCodeGen -lclangStaticAnalyzerFrontend
-lclangStaticAnalyzerCore -lclangStaticAnalyzerCheckers -lclangASTMatchers
-lclangCrossTU -lclangUnifiedSymbolResolution -lclangTooling -lclangToolingCore
-lclangRewriteFrontend -lclangRewrite -lclangParse -lclangSema -lclangAPINotes
-lclangAnalysis -lclangFormat -lclangToolingInclusions
-lclangAnalysisLifetimeSafety -lclangLex -lclangEdit -lclangBasic
-lclangSupport -lLLVMCoverage -lLLVMFrontendDriver -lLLVMFrontendHLSL
-lLLVMDTLTO -lLLVMLTO -lLLVMPlugins -lLLVMOption -lLLVMSymbolize
-lLLVMWindowsDriver -lrt -lm@' build-comgr/CMakeFiles/amd_comgr.dir/link.txt
+%else
sed -i -e 's@-lrt -lm@-lLLVMCoverage -lLLVMFrontendDriver -lLLVMFrontendHLSL
-lLLVMLTO -lLLVMOption -lLLVMSymbolize -lLLVMWindowsDriver -lrt -lm@'
build-comgr/CMakeFiles/amd_comgr.dir/link.txt
%endif
+%endif
%cmake_build -j ${JOBS}
# Check that static linking happened
# ldd build-comgr/libamd_comgr.so
+# false
popd
@@ -621,13 +865,15 @@
%define __sourcedir amd/device-libs
%define __builddir build-devicelibs
%else
-%define _vpath_srcdir amd/device-libs
-%define _vpath_builddir build-devicelibs
+%global _vpath_srcdir amd/device-libs
+%global _vpath_builddir build-devicelibs
%endif
pushd .
# Workaround for bug in cmake tests not finding amdgcn:
ln -s %{amd_device_libs_prefix}/amdgcn build-devicelibs/amdgcn
+%if %{with broken_tests}
%ctest
+%endif
popd
%install
@@ -641,7 +887,7 @@
%if 0%{?suse_version}
%define __builddir build-llvm-2
%else
-%define _vpath_builddir build-llvm-2
+%global _vpath_builddir build-llvm-2
%endif
%cmake_install
@@ -655,10 +901,17 @@
%if 0%{?suse_version}
%define __builddir build-devicelibs
%else
-%define _vpath_builddir build-devicelibs
+%global _vpath_builddir build-devicelibs
%endif
%cmake_install
+
+# move cmake bits to where the others are
+mkdir -p %{buildroot}%{pkg_prefix}/%{pkg_libdir}/cmake
+mv %{buildroot}%{amd_device_libs_prefix}/%{pkg_libdir}/cmake/*
%{buildroot}%{pkg_prefix}/%{pkg_libdir}/cmake
+# no extra license please
+rm -rf %{buildroot}%{amd_device_libs_prefix}/share
+
popd
#
@@ -668,7 +921,7 @@
%if 0%{?suse_version}
%define __builddir build-comgr
%else
-%define _vpath_builddir build-comgr
+%global _vpath_builddir build-comgr
%endif
%cmake_install
@@ -681,60 +934,59 @@
%if 0%{?suse_version}
%define __builddir build-hipcc
%else
-%define _vpath_builddir build-hipcc
+%global _vpath_builddir build-hipcc
%endif
%cmake_install
popd
-# Make directories users of rocm-rpm-modules will install to
-%global modules_gpu_list gfx8 gfx9 gfx10 gfx11 gfx12 gfx906 gfx908 gfx90a
gfx942 gfx950 gfx1031 gfx1036 gfx1100 gfx1101 gfx1102 gfx1103 gfx1150 gfx1151
gfx1152 gfx1153 gfx1200 gfx1201
-for gpu in %{modules_gpu_list}
-do
- mkdir -p %{buildroot}%{_libdir}/rocm/$gpu/lib/cmake
- mkdir -p %{buildroot}%{_libdir}/rocm/$gpu/bin
- mkdir -p %{buildroot}%{_libdir}/rocm/$gpu/include
-done
-mkdir -p %{buildroot}%{_libdir}/rocm/lib/cmake
-mkdir -p %{buildroot}%{_libdir}/rocm/bin
-mkdir -p %{buildroot}%{_libdir}/rocm/include
-
-rm -rf %{buildroot}%{_prefix}/hip
-if [ -f
%{buildroot}%{_prefix}/share/doc/packages/rocm-compilersupport/LICENSE.TXT ];
then
- rm %{buildroot}%{_prefix}/share/doc/packages/rocm-compilersupport/LICENSE.*
-fi
-if [ -f
%{buildroot}%{_prefix}/share/doc/packages/rocm-compilersupport/NOTICES.txt ];
then
- rm
%{buildroot}%{_prefix}/share/doc/packages/rocm-compilersupport/NOTICES.txt
-fi
-if [ -f
%{buildroot}%{_prefix}/share/doc/packages/rocm-compilersupport/README.md ]; then
- rm %{buildroot}%{_prefix}/share/doc/packages/rocm-compilersupport/README.md
-fi
+rm -rf %{buildroot}%{pkg_prefix}/hip
+rm -rf %{buildroot}%{pkg_prefix}/share/doc/packages/*
%if 0%{?suse_version}
find %{buildroot}%{bundle_prefix}/bin -type f -executable -exec strip {} \;
-find %{buildroot}%{_bindir} -type f -executable -exec strip {} \;
+find %{buildroot}%{pkg_prefix}/bin -type f -executable -exec strip {} \;
find %{buildroot}%{bundle_prefix}/lib -type f -name '*.so*' -exec strip {} \;
-find %{buildroot}%{_libdir} -type f -name '*.so*' -exec strip {} \;
+find %{buildroot}%{pkg_prefix}/lib64 -type f -name '*.so*' -exec strip {} \;
%endif
# Remove lld's libs
rm -rf %{buildroot}%{bundle_prefix}/include/lld
rm -rf %{buildroot}%{bundle_prefix}/lib/cmake/lld
rm -rf %{buildroot}%{bundle_prefix}/lib/liblld*
+# rm wasm-ld
+rm -rf %{buildroot}%{bundle_prefix}/bin/wasm-ld
# Remove exec perm
chmod a-x %{buildroot}%{bundle_prefix}/share/opt-viewer/optpmap.py
chmod a-x %{buildroot}%{bundle_prefix}/share/opt-viewer/style.css
-%if %{with perl}
-# Fix perl module files installation:
-# Eventually upstream plans to deprecate Perl usage, see README.md
-mkdir -p %{buildroot}%{perl_vendorlib}
-mv %{buildroot}%{_bindir}/hip*.pm %{buildroot}%{perl_vendorlib}
-%else
-rm %{buildroot}%{_bindir}/hip*.pm
-rm %{buildroot}%{_bindir}/hip*.pl
-%endif
+# Lingering perl
+rm -f %{buildroot}%{pkg_prefix}/bin/hipvars.pm
+
+# Extra docs
+rm -rf %{buildroot}%{pkg_prefix}/share/doc/ROCm-Device-Libs/LICENSE.TXT
+rm -rf %{buildroot}%{pkg_prefix}/share/doc/amd_comgr/LICENSE.txt
+rm -rf %{buildroot}%{pkg_prefix}/share/doc/amd_comgr/README.md
+rm -rf %{buildroot}%{pkg_prefix}/share/doc/hipcc/LICENSE.txt
+rm -rf %{buildroot}%{pkg_prefix}/share/doc/hipcc/README.md
+rm -rf %{buildroot}%{bundle_prefix}/share/man/man1/scan-build.1
+
+# rocm-clang.x86_64: W: dangling-relative-symlink
/usr/lib64/rocm/llvm/bin/nvptx-arch offload-arch
+rm -f %{buildroot}%{bundle_prefix}/bin/nvptx-arch
+
+# rocm-clang-analyzer.x86_64: E: non-executable-script
/usr/lib64/rocm/llvm/share/scan-view/Reporter.py 644 /usr/bin/env python
+sed -i -e 's@/usr/bin/env python@/usr/bin/python3@'
%{buildroot}%{bundle_prefix}/share/scan-view/*.py
+chmod a+x %{buildroot}%{bundle_prefix}/share/scan-view/*.py
+
+# rocm-clang-devel.x86_64: E: zero-length
/usr/lib64/rocm/llvm/include/clang/Basic/DiagnosticASTCompatIDs.inc
+# Removing these causea a problem later
+# In file included from
/usr/lib64/rocm/llvm/include/clang/Basic/DiagnosticIDs.h:103:
+#
/usr/lib64/rocm/llvm/include/clang/Basic/DiagnosticCommonInterface.inc:22:10:
fatal error: 'clang/Basic/DiagnosticCommonEnums.inc' file not found
+ 22 | #include "clang/Basic/DiagnosticCommonEnums.inc"
+
+# rocm-clang-analyzer.x86_64: W: devel-file-in-non-devel-package
/usr/lib64/rocm/llvm/lib/libear/ear.c
+rm %{buildroot}%{bundle_prefix}/lib/libear/ear.c
#Clean up dupes:
%if 0%{?fedora} || 0%{?suse_version}
@@ -744,168 +996,30 @@
%files macros
%{_rpmmacrodir}/macros.rocmcompiler
-%files -n rocm-device-libs
-%dir %{_libdir}/cmake/AMDDeviceLibs
+%files -n %{device_libs_name}
%license amd/device-libs/LICENSE.TXT
%doc amd/device-libs/README.md amd/device-libs/doc/*.md
-%{_libdir}/cmake/AMDDeviceLibs/*.cmake
-%{_prefix}/%{amd_device_libs_prefix}/amdgcn
-%if 0%{?rhel} || 0%{?fedora}
-%exclude %{_docdir}/ROCm-Device-Libs
-%endif
+%{pkg_prefix}/%{pkg_libdir}/cmake/AMDDeviceLibs/
+%{amd_device_libs_prefix}/amdgcn
%files -n %{comgr_name}
%license amd/comgr/LICENSE.txt
-%license amd/comgr/NOTICES.txt
%doc amd/comgr/README.md
-%{_libdir}/libamd_comgr.so.*
-%if 0%{?rhel} || 0%{?fedora}
-%exclude %{_docdir}/amd_comgr
-%endif
+%{pkg_prefix}/%{pkg_libdir}/libamd_comgr.so.*
%files -n %{comgr_name}-devel
-%dir %{_includedir}/amd_comgr
-%dir %{_libdir}/cmake/amd_comgr
-%{_includedir}/amd_comgr/amd_comgr.h
-%{_libdir}/libamd_comgr.so
-%{_libdir}/cmake/amd_comgr/*.cmake
+%{pkg_prefix}/include/amd_comgr/
+%{pkg_prefix}/%{pkg_libdir}/cmake/amd_comgr/
+%{pkg_prefix}/%{pkg_libdir}/libamd_comgr.so
-%files -n hipcc
+%files -n %{hipcc_name}
%license amd/hipcc/LICENSE.txt
%doc amd/hipcc/README.md
-%{_bindir}/hipcc
-%{_bindir}/hipconfig
-
-%if %{with perl}
-%{_bindir}/hipcc.pl
-%{_bindir}/hipconfig.pl
-%{perl_vendorlib}/hip*.pm
-%endif
-
-%if 0%{?rhel} || 0%{?fedora}
-%exclude %{_docdir}/hipcc
-%endif
-
-%files -n hipcc-libomp-devel
+%{pkg_prefix}/bin/hipcc
+%{pkg_prefix}/bin/hipconfig
# ROCM LLVM
-%files -n rocm-llvm-filesystem
-%dir %{_libdir}/rocm
-# For rocm-rpm-modules
-%dir %{_libdir}/rocm/bin
-%dir %{_libdir}/rocm/include
-%dir %{_libdir}/rocm/lib
-%dir %{_libdir}/rocm/gfx8
-%dir %{_libdir}/rocm/gfx8/bin
-%dir %{_libdir}/rocm/gfx8/include
-%dir %{_libdir}/rocm/gfx8/lib
-%dir %{_libdir}/rocm/gfx8/lib/cmake
-%dir %{_libdir}/rocm/gfx9
-%dir %{_libdir}/rocm/gfx9/bin
-%dir %{_libdir}/rocm/gfx9/include
-%dir %{_libdir}/rocm/gfx9/lib
-%dir %{_libdir}/rocm/gfx9/lib/cmake
-%dir %{_libdir}/rocm/gfx10
-%dir %{_libdir}/rocm/gfx10/bin
-%dir %{_libdir}/rocm/gfx10/include
-%dir %{_libdir}/rocm/gfx10/lib
-%dir %{_libdir}/rocm/gfx10/lib/cmake
-%dir %{_libdir}/rocm/gfx11
-%dir %{_libdir}/rocm/gfx11/bin
-%dir %{_libdir}/rocm/gfx11/include
-%dir %{_libdir}/rocm/gfx11/lib
-%dir %{_libdir}/rocm/gfx11/lib/cmake
-%dir %{_libdir}/rocm/gfx12
-%dir %{_libdir}/rocm/gfx12/bin
-%dir %{_libdir}/rocm/gfx12/include
-%dir %{_libdir}/rocm/gfx12/lib
-%dir %{_libdir}/rocm/gfx12/lib/cmake
-%dir %{_libdir}/rocm/gfx906
-%dir %{_libdir}/rocm/gfx906/bin
-%dir %{_libdir}/rocm/gfx906/include
-%dir %{_libdir}/rocm/gfx906/lib
-%dir %{_libdir}/rocm/gfx906/lib/cmake
-%dir %{_libdir}/rocm/gfx908
-%dir %{_libdir}/rocm/gfx908/bin
-%dir %{_libdir}/rocm/gfx908/include
-%dir %{_libdir}/rocm/gfx908/lib
-%dir %{_libdir}/rocm/gfx908/lib/cmake
-%dir %{_libdir}/rocm/gfx90a
-%dir %{_libdir}/rocm/gfx90a/bin
-%dir %{_libdir}/rocm/gfx90a/include
-%dir %{_libdir}/rocm/gfx90a/lib
-%dir %{_libdir}/rocm/gfx90a/lib/cmake
-%dir %{_libdir}/rocm/gfx942
-%dir %{_libdir}/rocm/gfx942/bin
-%dir %{_libdir}/rocm/gfx942/include
-%dir %{_libdir}/rocm/gfx942/lib
-%dir %{_libdir}/rocm/gfx942/lib/cmake
-%dir %{_libdir}/rocm/gfx950
-%dir %{_libdir}/rocm/gfx950/bin
-%dir %{_libdir}/rocm/gfx950/include
-%dir %{_libdir}/rocm/gfx950/lib
-%dir %{_libdir}/rocm/gfx950/lib/cmake
-%dir %{_libdir}/rocm/gfx1031
-%dir %{_libdir}/rocm/gfx1031/bin
-%dir %{_libdir}/rocm/gfx1031/include
-%dir %{_libdir}/rocm/gfx1031/lib
-%dir %{_libdir}/rocm/gfx1031/lib/cmake
-%dir %{_libdir}/rocm/gfx1036
-%dir %{_libdir}/rocm/gfx1036/bin
-%dir %{_libdir}/rocm/gfx1036/include
-%dir %{_libdir}/rocm/gfx1036/lib
-%dir %{_libdir}/rocm/gfx1036/lib/cmake
-%dir %{_libdir}/rocm/gfx1100
-%dir %{_libdir}/rocm/gfx1100/bin
-%dir %{_libdir}/rocm/gfx1100/include
-%dir %{_libdir}/rocm/gfx1100/lib
-%dir %{_libdir}/rocm/gfx1100/lib/cmake
-%dir %{_libdir}/rocm/gfx1101
-%dir %{_libdir}/rocm/gfx1101/bin
-%dir %{_libdir}/rocm/gfx1101/include
-%dir %{_libdir}/rocm/gfx1101/lib
-%dir %{_libdir}/rocm/gfx1101/lib/cmake
-%dir %{_libdir}/rocm/gfx1102
-%dir %{_libdir}/rocm/gfx1102/bin
-%dir %{_libdir}/rocm/gfx1102/include
-%dir %{_libdir}/rocm/gfx1102/lib
-%dir %{_libdir}/rocm/gfx1102/lib/cmake
-%dir %{_libdir}/rocm/gfx1103
-%dir %{_libdir}/rocm/gfx1103/bin
-%dir %{_libdir}/rocm/gfx1103/include
-%dir %{_libdir}/rocm/gfx1103/lib
-%dir %{_libdir}/rocm/gfx1103/lib/cmake
-%dir %{_libdir}/rocm/gfx1150
-%dir %{_libdir}/rocm/gfx1150/bin
-%dir %{_libdir}/rocm/gfx1150/include
-%dir %{_libdir}/rocm/gfx1150/lib
-%dir %{_libdir}/rocm/gfx1150/lib/cmake
-%dir %{_libdir}/rocm/gfx1151
-%dir %{_libdir}/rocm/gfx1151/bin
-%dir %{_libdir}/rocm/gfx1151/include
-%dir %{_libdir}/rocm/gfx1151/lib
-%dir %{_libdir}/rocm/gfx1151/lib/cmake
-%dir %{_libdir}/rocm/gfx1152
-%dir %{_libdir}/rocm/gfx1152/bin
-%dir %{_libdir}/rocm/gfx1152/include
-%dir %{_libdir}/rocm/gfx1152/lib
-%dir %{_libdir}/rocm/gfx1152/lib/cmake
-%dir %{_libdir}/rocm/gfx1153
-%dir %{_libdir}/rocm/gfx1153/bin
-%dir %{_libdir}/rocm/gfx1153/include
-%dir %{_libdir}/rocm/gfx1153/lib
-%dir %{_libdir}/rocm/gfx1153/lib/cmake
-%dir %{_libdir}/rocm/gfx1200
-%dir %{_libdir}/rocm/gfx1200/bin
-%dir %{_libdir}/rocm/gfx1200/include
-%dir %{_libdir}/rocm/gfx1200/lib
-%dir %{_libdir}/rocm/gfx1200/lib/cmake
-%dir %{_libdir}/rocm/gfx1201
-%dir %{_libdir}/rocm/gfx1201/bin
-%dir %{_libdir}/rocm/gfx1201/include
-%dir %{_libdir}/rocm/gfx1201/lib
-%dir %{_libdir}/rocm/gfx1201/lib/cmake
-# For llvm
+%files -n %{rocm_llvm_name}-filesystem
%dir %{bundle_prefix}
%dir %{bundle_prefix}/bin
%dir %{bundle_prefix}/include
@@ -913,6 +1027,7 @@
%dir %{bundle_prefix}/include/clang-c
%dir %{bundle_prefix}/include/llvm
%dir %{bundle_prefix}/include/llvm-c
+%dir %{bundle_prefix}/include/clang-tidy
%dir %{bundle_prefix}/lib
%dir %{bundle_prefix}/lib/clang
%dir %{bundle_prefix}/lib/clang/%{llvm_maj_ver}
@@ -926,60 +1041,71 @@
%dir %{bundle_prefix}/lib/cmake
%dir %{bundle_prefix}/lib/cmake/clang
%dir %{bundle_prefix}/lib/cmake/llvm
+%dir %{bundle_prefix}/libexec
%dir %{bundle_prefix}/share
%dir %{bundle_prefix}/share/clang
%dir %{bundle_prefix}/share/opt-viewer
-%files -n rocm-llvm-libs
+%files -n %{rocm_llvm_name}-libs
+%license llvm/LICENSE.TXT
%{bundle_prefix}/lib/libLLVM-*.so
%{bundle_prefix}/lib/libLLVM.so.*
%{bundle_prefix}/lib/libLTO.so.*
%{bundle_prefix}/lib/libRemarks.so.*
-%post -n rocm-llvm-libs -p /sbin/ldconfig
-%postun -n rocm-llvm-libs -p /sbin/ldconfig
+%if 0%{?suse_version}
+%ldconfig_scriptlets -n %{rocm_llvm_name}-libs
+%endif
-%files -n rocm-llvm
+%files -n %{rocm_llvm_name}
%license llvm/LICENSE.TXT
+%if %{without preview}
%{bundle_prefix}/bin/bugpoint
+%else
+%{bundle_prefix}/bin/llubi
+%endif
%{bundle_prefix}/bin/llc
%{bundle_prefix}/bin/lli
%{bundle_prefix}/bin/amdgpu-arch
%{bundle_prefix}/bin/dsymutil
%{bundle_prefix}/bin/llvm*
+%{bundle_prefix}/bin/offload-arch
%{bundle_prefix}/bin/opt
%{bundle_prefix}/bin/reduce-chunk-list
%{bundle_prefix}/bin/sancov
%{bundle_prefix}/bin/sanstats
%{bundle_prefix}/bin/verify-uselistorder
-%{bundle_prefix}/share/opt-viewer/*
+%{bundle_prefix}/share/opt-viewer/
-%files -n rocm-llvm-devel
+%files -n %{rocm_llvm_name}-devel
%license llvm/LICENSE.TXT
-%{bundle_prefix}/include/llvm/*
-%{bundle_prefix}/include/llvm-c/*
-%{bundle_prefix}/lib/cmake/llvm/*
+%{bundle_prefix}/include/llvm/
+%{bundle_prefix}/include/llvm-c/
+%{bundle_prefix}/lib/cmake/llvm/
%{bundle_prefix}/lib/libLLVM.so
%{bundle_prefix}/lib/libLTO.so
%{bundle_prefix}/lib/libRemarks.so
+%if %{with gold}
%{bundle_prefix}/lib/LLVMgold.so
+%endif
-%files -n rocm-llvm-static
+%files -n %{rocm_llvm_name}-static
%license llvm/LICENSE.TXT
%{bundle_prefix}/lib/libLLVM*.a
# ROCM CLANG
-%files -n rocm-clang-libs
+%files -n %{rocm_clang_name}-libs
+%license clang/LICENSE.TXT
%{bundle_prefix}/lib/libclang*.so.*
-%files -n rocm-clang-runtime-devel
-%{bundle_prefix}/lib/clang/%{llvm_maj_ver}/include/*
+%files -n %{rocm_clang_name}-runtime-devel
+%license clang/LICENSE.TXT
+%{bundle_prefix}/lib/clang/%{llvm_maj_ver}/include/
%{bundle_prefix}/lib/clang/%{llvm_maj_ver}/lib/linux/clang_rt.*
%{bundle_prefix}/lib/clang/%{llvm_maj_ver}/lib/linux/libclang_rt.*
-%files -n rocm-clang
+%files -n %{rocm_clang_name}
%license clang/LICENSE.TXT
-%{bundle_prefix}/bin/c-index-test
%{bundle_prefix}/bin/clang*
%{bundle_prefix}/bin/diagtool
%{bundle_prefix}/bin/find-all-symbols
@@ -987,56 +1113,87 @@
%{bundle_prefix}/bin/git-clang-format
%{bundle_prefix}/bin/hmaptool
%{bundle_prefix}/bin/modularize
-%{bundle_prefix}/bin/nvptx-arch
%{bundle_prefix}/bin/pp-trace
-%{bundle_prefix}/share/clang/*
+%{bundle_prefix}/share/clang/
%{bundle_prefix}/share/clang-doc
+%{bundle_prefix}/bin/amdclang*
+%{bundle_prefix}/bin/amdflang*
+%{bundle_prefix}/bin/amdlld
+%{bundle_prefix}/bin/amdllvm
+%if %{with preview}
+%endif
-%files -n rocm-clang-devel
+%files -n %{rocm_clang_name}-devel
%license clang/LICENSE.TXT
-%{bundle_prefix}/include/clang/*
-%{bundle_prefix}/include/clang-c/*
-%{bundle_prefix}/lib/cmake/clang/*
+%{bundle_prefix}/include/clang/
+%{bundle_prefix}/include/clang-c/
+%{bundle_prefix}/lib/cmake/clang/
%{bundle_prefix}/lib/libclang*.so
# ROCM CLANG TOOLS EXTRA
-%files -n rocm-clang-tools-extra
+%files -n %{rocm_clang_tools_extra_name}
%license clang-tools-extra/LICENSE.TXT
%{bundle_prefix}/bin/run-clang-tidy
-%files -n rocm-clang-tools-extra-devel
-%dir %{bundle_prefix}/include/clang-tidy
+%files -n %{rocm_clang_tools_extra_name}-devel
%license clang-tools-extra/LICENSE.TXT
-%{bundle_prefix}/include/clang-tidy/*
+%{bundle_prefix}/include/clang-tidy/
# ROCM LLD
-%files -n rocm-lld
+%files -n %{rocm_lld_name}
%license lld/LICENSE.TXT
%{bundle_prefix}/bin/ld.lld
%{bundle_prefix}/bin/ld64.lld
%{bundle_prefix}/bin/lld
%{bundle_prefix}/bin/lld-link
-%{bundle_prefix}/bin/wasm-ld
# ROCM LIBC++
-%files -n rocm-libc++
+%if %{with libcxx}
+%files -n %{rocm_libcxx_name}
%license libcxx/LICENSE.TXT
%{bundle_prefix}/lib/libc++.so.*
%{bundle_prefix}/lib/libc++abi.so.*
%{bundle_prefix}/lib/libc++.modules.json
-%post -n rocm-libc++ -p /sbin/ldconfig
-%postun -n rocm-libc++ -p /sbin/ldconfig
+%if 0%{?suse_version}
+%ldconfig_scriptlets -n %{rocm_libcxx_name}
+%endif
-%files -n rocm-libc++-devel
+%files -n %{rocm_libcxx_name}-devel
%dir %{bundle_prefix}/share/libc++
%{bundle_prefix}/include/c++/
%{bundle_prefix}/share/libc++/
%{bundle_prefix}/lib/libc++.so
%{bundle_prefix}/lib/libc++abi.so
-%files -n rocm-libc++-static
+%files -n %{rocm_libcxx_name}-static
%{bundle_prefix}/lib/libc++.a
%{bundle_prefix}/lib/libc++abi.a
%{bundle_prefix}/lib/libc++experimental.a
+%endif
+
+%if %{with sa}
+%files -n %{rocm_clang_analyzer_name}
+%{bundle_prefix}/bin/analyze-build
+%{bundle_prefix}/bin/intercept-build
+%{bundle_prefix}/bin/scan-build
+%{bundle_prefix}/bin/scan-build-py
+%{bundle_prefix}/bin/scan-view
+%{bundle_prefix}/lib/libear/
+%{bundle_prefix}/lib/libscanbuild/
+%{bundle_prefix}/libexec/analyze-c++
+%{bundle_prefix}/libexec/analyze-cc
+%{bundle_prefix}/libexec/c++-analyzer
+%{bundle_prefix}/libexec/ccc-analyzer
+%{bundle_prefix}/libexec/intercept-c++
+%{bundle_prefix}/libexec/intercept-cc
+%{bundle_prefix}/share/scan-build/
+%{bundle_prefix}/share/scan-view/
+%endif
+
+%if %{with preview}
+%files -n %{rocm_omp_name}-devel
+%{bundle_prefix}/lib/cmake/openmp/
+%{bundle_prefix}/lib/libomp*.so
+%endif
++++++ 0001-SemaConcept.cpp-fix-MSVC-not-all-control-paths-retur.patch ++++++
>From 1535da76981c5ee7e9d9897dd0b0a0f53ad20198 Mon Sep 17 00:00:00 2001
From: Simon Pilgrim <[email protected]>
Date: Mon, 6 Oct 2025 11:26:51 +0100
Subject: [PATCH] SemaConcept.cpp - fix MSVC "not all control paths return a
value" warnings. NFC. (#162060)
---
clang/lib/Sema/SemaConcept.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/clang/lib/Sema/SemaConcept.cpp b/clang/lib/Sema/SemaConcept.cpp
index 11d2d5c3938c..999e302c0253 100644
--- a/clang/lib/Sema/SemaConcept.cpp
+++ b/clang/lib/Sema/SemaConcept.cpp
@@ -1049,6 +1049,7 @@ ExprResult ConstraintSatisfactionChecker::Evaluate(
case NormalizedConstraint::ConstraintKind::Compound:
return Evaluate(static_cast<const CompoundConstraint &>(Constraint),
MLTAL);
}
+ llvm_unreachable("Unknown ConstraintKind enum");
}
static bool CheckConstraintSatisfaction(
@@ -2141,6 +2142,7 @@ bool
SubstituteParameterMappings::substitute(NormalizedConstraint &N) {
return substitute(Compound.getRHS());
}
}
+ llvm_unreachable("Unknown ConstraintKind enum");
}
} // namespace
@@ -2561,7 +2563,6 @@ FormulaType SubsumptionChecker::Normalize(const
NormalizedConstraint &NC) {
};
switch (NC.getKind()) {
-
case NormalizedConstraint::ConstraintKind::Atomic:
return {{find(&static_cast<const AtomicConstraint &>(NC))}};
@@ -2601,6 +2602,7 @@ FormulaType SubsumptionChecker::Normalize(const
NormalizedConstraint &NC) {
return Res;
}
}
+ llvm_unreachable("Unknown ConstraintKind enum");
}
void SubsumptionChecker::AddUniqueClauseToFormula(Formula &F, Clause C) {
--
2.52.0
++++++ 0001-clang-23-link-libamdhip64.patch ++++++
>From 7e1604b19501052c98ac64004b88c27a24c70433 Mon Sep 17 00:00:00 2001
From: Tom Rix <[email protected]>
Date: Thu, 16 Jul 2026 07:14:44 -0700
Subject: [PATCH] clang 23 link libamdhip64
---
clang/lib/Driver/ToolChains/Linux.cpp | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/clang/lib/Driver/ToolChains/Linux.cpp
b/clang/lib/Driver/ToolChains/Linux.cpp
index 80b72abda812..9d5686ec9f64 100644
--- a/clang/lib/Driver/ToolChains/Linux.cpp
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
@@ -1113,7 +1113,7 @@ void Linux::addOffloadRTLibs(unsigned ActiveKinds, const
ArgList &Args,
llvm::SmallVector<std::pair<StringRef, StringRef>> Libraries;
if (ActiveKinds & Action::OFK_HIP)
- Libraries.emplace_back(RocmInstallation->getLibPath(), "libamdhip64.so");
+ CmdArgs.push_back("-lamdhip64");
else if (ActiveKinds & Action::OFK_SYCL)
Libraries.emplace_back(SYCLInstallation->getSYCLRTLibPath(),
"libLLVMSYCL.so");
@@ -1131,10 +1131,6 @@ void Linux::addOffloadRTLibs(unsigned ActiveKinds, const
ArgList &Args,
CmdArgs.push_back(Args.MakeArgString(p));
}
- // FIXME: The ROCm builds implicitly depends on this being present.
- if (ActiveKinds & Action::OFK_HIP)
- CmdArgs.push_back(
- Args.MakeArgString(StringRef("-L") + RocmInstallation->getLibPath()));
}
void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs,
--
2.54.0
++++++ 0001-comgr-link-with-static-llvm.patch ++++++
--- /var/tmp/diff_new_pack.xb7Hgb/_old 2026-09-21 14:29:42.650862987 +0200
+++ /var/tmp/diff_new_pack.xb7Hgb/_new 2026-09-21 14:29:42.652863070 +0200
@@ -1,4 +1,4 @@
-From 341d5f58dfb731bbec24b3969096db12ed1e271e Mon Sep 17 00:00:00 2001
+From 54ba86345412add14d7e911037a42478cd206ea6 Mon Sep 17 00:00:00 2001
From: Tom Rix <[email protected]>
Date: Wed, 16 Apr 2025 09:24:34 -0700
Subject: [PATCH] comgr link with static llvm
@@ -8,10 +8,10 @@
1 file changed, 25 insertions(+), 28 deletions(-)
diff --git a/amd/comgr/CMakeLists.txt b/amd/comgr/CMakeLists.txt
-index ed01d21cea30..877762811ff6 100644
+index 21a544402c48..41f65fb8a5f7 100644
--- a/amd/comgr/CMakeLists.txt
+++ b/amd/comgr/CMakeLists.txt
-@@ -418,31 +418,27 @@ else()
+@@ -430,31 +430,27 @@ else()
set(SPIRV_STATIC_LIB "SPIRVAMDLib")
endif()
@@ -64,7 +64,7 @@
target_link_options(amd_comgr
PUBLIC
-@@ -452,9 +448,10 @@ target_link_options(amd_comgr
+@@ -464,9 +460,10 @@ target_link_options(amd_comgr
target_link_libraries(amd_comgr
PRIVATE
@@ -79,6 +79,6 @@
if (NOT UNIX)
target_link_libraries(amd_comgr
--
-2.48.1
+2.52.0
++++++ 0001-lld-workaround-.gnu.version-change.patch ++++++
>From f76e91d21a8cd368fe24ca39598413b51c51790f Mon Sep 17 00:00:00 2001
From: Tom Rix <[email protected]>
Date: Fri, 14 Nov 2025 12:44:23 -0800
Subject: [PATCH] lld workaround .gnu.version change
---
lld/ELF/InputFiles.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index a5921feb1829..7de9ff4020be 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -1698,6 +1698,7 @@ template <class ELFT> void SharedFile::parse() {
continue;
}
+ /*
if (ver == VER_NDX_LOCAL ||
(ver != VER_NDX_GLOBAL && idx >= verdefs.size())) {
// In GNU ld < 2.31 (before 3be08ea4728b56d35e136af4e6fd3086ade17764),
the
@@ -1709,7 +1710,7 @@ template <class ELFT> void SharedFile::parse() {
<< " for symbol " << name
<< " is out of bounds\n>>> defined in " << this;
continue;
- }
+ }*/
uint32_t alignment = getAlignment<ELFT>(sections, sym);
if (ver == idx) {
@@ -1723,7 +1724,8 @@ template <class ELFT> void SharedFile::parse() {
// Also add the symbol with the versioned name to handle undefined symbols
// with explicit versions.
- if (ver == VER_NDX_GLOBAL)
+ if (sym.isExternal() &&
+ (ver == VER_NDX_LOCAL || ver == VER_NDX_GLOBAL))
continue;
StringRef verName =
--
2.52.0
++++++ 0001-preview-comgr-link-with-static-llvm.patch ++++++
>From 62c0ac9c782d3476e7a019f52e4339d879473094 Mon Sep 17 00:00:00 2001
From: Tom Rix <[email protected]>
Date: Thu, 16 Jul 2026 07:09:30 -0700
Subject: [PATCH] preview comgr link with static llvm
---
amd/comgr/CMakeLists.txt | 53 +++++++++++++++++++---------------------
1 file changed, 25 insertions(+), 28 deletions(-)
diff --git a/amd/comgr/CMakeLists.txt b/amd/comgr/CMakeLists.txt
index c05a4afb7d80..1b453943ba1d 100644
--- a/amd/comgr/CMakeLists.txt
+++ b/amd/comgr/CMakeLists.txt
@@ -538,31 +538,27 @@ else()
set(SPIRV_STATIC_LIB "")
endif()
-if (LLVM_LINK_LLVM_DYLIB)
- set(LLVM_LIBS LLVM ${SPIRV_DYNAMIC_LIB})
-else()
- llvm_map_components_to_libnames(LLVM_LIBS
- ${LLVM_TARGETS_TO_BUILD}
- BinaryFormat
- BitReader
- BitWriter
- CodeGen
- Core
- DebugInfoDWARF
- Demangle
- IRReader
- Linker
- MC
- MCDisassembler
- MCParser
- Object
- Option
- Support
- Symbolize
- TargetParser
- ${SPIRV_STATIC_LIB}
- )
-endif()
+llvm_map_components_to_libnames(LLVM_LIBS
+ ${LLVM_TARGETS_TO_BUILD}
+ BinaryFormat
+ BitReader
+ BitWriter
+ CodeGen
+ Core
+ DebugInfoDWARF
+ Demangle
+ IRReader
+ Linker
+ MC
+ MCDisassembler
+ MCParser
+ Object
+ Option
+ Support
+ Symbolize
+ TargetParser
+ ${SPIRV_STATIC_LIB}
+)
target_link_options(amd_comgr
PUBLIC
@@ -572,9 +568,10 @@ target_link_options(amd_comgr
target_link_libraries(amd_comgr
PRIVATE
- ${LLD_LIBS}
- ${LLVM_LIBS}
- ${CLANG_LIBS})
+ ${LLD_LIBS}
+ ${CLANG_LIBS}
+ ${LLVM_LIBS}
+)
# hotswap transpiler link edge — must come after the curated LLVM set above so
# static-archive resolution pulls in the full set (incl. LLVMCodeGen's -mcpu
--
2.54.0
++++++ 0001-rocm-compilersupport-force-hip-runtime-detection.patch ++++++
>From f49602b60c633c6c77787db664520b9827fd503b Mon Sep 17 00:00:00 2001
From: Tom Rix <[email protected]>
Date: Thu, 18 Sep 2025 10:55:43 -0700
Subject: [PATCH] rocm-compilersupport force hip runtime detection
---
clang/lib/Driver/ToolChains/AMDGPU.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp
b/clang/lib/Driver/ToolChains/AMDGPU.cpp
index 4f30b532bec5..4ba91edfdfd9 100644
--- a/clang/lib/Driver/ToolChains/AMDGPU.cpp
+++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp
@@ -453,6 +453,9 @@ void RocmInstallationDetector::detectHIPRuntime() {
if (!HIPPathEnv->empty())
HIPSearchDirs.emplace_back(std::move(*HIPPathEnv));
}
+#if 1
+ HasHIPRuntime = true;
+#else
if (HIPSearchDirs.empty())
HIPSearchDirs.append(getInstallationPathCandidates());
auto &FS = D.getVFS();
@@ -511,6 +514,7 @@ void RocmInstallationDetector::detectHIPRuntime() {
}
}
HasHIPRuntime = false;
+#endif
}
void RocmInstallationDetector::print(raw_ostream &OS) const {
--
2.52.0
++++++ 0001-rocm-compilersupport-simplify-use-runtime-wrapper-ch.patch ++++++
>From 82eaa017263911119f0f0f4d77160a5b3c2e7dfb Mon Sep 17 00:00:00 2001
From: trix <[email protected]>
Date: Fri, 19 Sep 2025 17:34:31 -0700
Subject: [PATCH] rocm-compilersupport simplify use runtime wrapper check
---
clang/lib/Driver/ToolChains/AMDGPU.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp
b/clang/lib/Driver/ToolChains/AMDGPU.cpp
index 4ba91edfdfd9..0929960ada2f 100644
--- a/clang/lib/Driver/ToolChains/AMDGPU.cpp
+++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp
@@ -525,8 +525,7 @@ void RocmInstallationDetector::print(raw_ostream &OS) const
{
void RocmInstallationDetector::AddHIPIncludeArgs(const ArgList &DriverArgs,
ArgStringList &CC1Args) const
{
- bool UsesRuntimeWrapper = VersionMajorMinor > llvm::VersionTuple(3, 5) &&
- !DriverArgs.hasArg(options::OPT_nohipwrapperinc);
+ bool UsesRuntimeWrapper = !DriverArgs.hasArg(options::OPT_nohipwrapperinc);
bool HasHipStdPar = DriverArgs.hasArg(options::OPT_hipstdpar);
if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
--
2.52.0
++++++ 0001-rocm-llvm-work-around-new-assert-in-array.patch ++++++
--- /var/tmp/diff_new_pack.xb7Hgb/_old 2026-09-21 14:29:42.707865373 +0200
+++ /var/tmp/diff_new_pack.xb7Hgb/_new 2026-09-21 14:29:42.710865498 +0200
@@ -1,4 +1,4 @@
-From 77b60432f85502270252ad997bc7f1086eca422c Mon Sep 17 00:00:00 2001
+From 6e3ee79b52e9578d7e152d99ddfc79fdf2a80948 Mon Sep 17 00:00:00 2001
From: Tom Rix <[email protected]>
Date: Tue, 11 Mar 2025 07:32:44 -0700
Subject: [PATCH] rocm-llvm: work around new assert in array
@@ -11,10 +11,10 @@
create mode 100644 clang/lib/Headers/cuda_wrappers/array
diff --git a/clang/lib/Headers/CMakeLists.txt
b/clang/lib/Headers/CMakeLists.txt
-index 66c3e5c8f617..937adc8a3f5a 100644
+index 3cde8a024e9d..c96290da4d2c 100644
--- a/clang/lib/Headers/CMakeLists.txt
+++ b/clang/lib/Headers/CMakeLists.txt
-@@ -288,6 +288,7 @@ set(files
+@@ -340,6 +340,7 @@ set(files
set(cuda_wrapper_files
cuda_wrappers/algorithm
@@ -68,6 +68,6 @@
+
+#endif // include guard
--
-2.48.1
+2.52.0
++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.xb7Hgb/_old 2026-09-21 14:29:42.743866880 +0200
+++ /var/tmp/diff_new_pack.xb7Hgb/_new 2026-09-21 14:29:42.746867005 +0200
@@ -1,6 +1,6 @@
-mtime: 1755861430
-commit: 3df113d69f14134e141390566e99b27cb7ec27928e55b86ae77bf397a527556a
-url: https://src.opensuse.org/ROCm/rocm-compilersupport.git
-revision: 3df113d69f14134e141390566e99b27cb7ec27928e55b86ae77bf397a527556a
+mtime: 1789579612
+commit: 5df7cd2d77b45f4541de0054ad91e507ca80967cb2f19a1ac8fb3ec848709857
+url: https://src.opensuse.org/ROCm/rocm-compilersupport
+revision: 5df7cd2d77b45f4541de0054ad91e507ca80967cb2f19a1ac8fb3ec848709857
projectscmsync: https://src.opensuse.org/ROCm/_ObsPrj
++++++ build.specials.obscpio ++++++
--- old/.gitignore 2025-08-23 10:02:56.000000000 +0200
+++ new/.gitignore 2026-09-16 19:26:52.000000000 +0200
@@ -4,3 +4,4 @@
_buildinfo*
debian
.osc
+changelog
++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore 2026-09-16 19:26:52.000000000 +0200
@@ -0,0 +1,7 @@
+sources
+README.md
+_buildconfig*
+_buildinfo*
+debian
+.osc
+changelog
++++++ rocm-compilersupport-6.4.2.tar.gz -> rocm-compilersupport-7.2.1.tar.gz
++++++
/work/SRC/openSUSE:Factory/rocm-compilersupport/rocm-compilersupport-6.4.2.tar.gz
/work/SRC/openSUSE:Factory/.rocm-compilersupport.new.383539/rocm-compilersupport-7.2.1.tar.gz
differ: char 12, line 1
++++++ rocm-compilersupport.prep.in ++++++
--- /var/tmp/diff_new_pack.xb7Hgb/_old 2026-09-21 14:29:42.912873954 +0200
+++ /var/tmp/diff_new_pack.xb7Hgb/_new 2026-09-21 14:29:42.915874080 +0200
@@ -1,5 +1,3 @@
-# Remove third-party
-rm -rf third-party
# Force clang to be shared
sed -i -e 's@if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR
ARG_INSTALL_WITH_TOOLCHAIN)@if (ARG_SHARED AND (NOT LLVM_INSTALL_TOOLCHAIN_ONLY
OR ARG_INSTALL_WITH_TOOLCHAIN))@' clang/cmake/modules/AddClang.cmake
# Force lld to be shared
@@ -10,7 +8,7 @@
#Remove redundant includes:
sed -i '/Args.push_back("-isystem");/,+3d' amd/comgr/src/comgr-compiler.cpp
#Source hard codes the libdir too:
-sed -i 's/lib\(\/clang\)/%{_lib}\1/' amd/comgr/src/comgr-compiler.cpp
+sed -i 's/lib\(\/clang\)/%{pkg_libdir}\1/' amd/comgr/src/comgr-compiler.cpp
# Fixup finding /opt/llvm
sed -i -e 's@sys::path::append(LLVMPath,
"llvm");@//sys::path::append(LLVMPath, "llvm");@' amd/comgr/src/comgr-env.cpp
@@ -26,36 +24,42 @@
-e "/add_comgr_test(nested_kernel_test/d" \
amd/comgr/test/CMakeLists.txt
-# Fix script shebang (Fedora doesn't allow using "env"):
-sed -i -e 's@env perl@perl@' amd/hipcc/bin/hipcc.pl
-sed -i -e 's@env perl@perl@' amd/hipcc/bin/hipconfig.pl
# ROCm upstream uses /opt for rocm-runtime, but Fedora uses /usr
# Don't include it again since /usr/include is already included:
sed -i '/" -isystem " + hsaPath + "\/include"/d' amd/hipcc/src/hipBin_amd.h
-# Same thing for hipcc.pl:
-sed -i '/^# Add paths to common HIP includes:/,/^$HIPCFLAGS/d' \
- amd/hipcc/bin/hipcc.pl
sed -i -e 's@env python3@python3@'
clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
sed -i -e 's@env python@python3@'
clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
+sed -i -e 's@env python@python3@' clang/tools/scan-build/bin/scan-build
+sed -i -e 's@env python@python3@' clang/tools/scan-view/bin/scan-view
# Default rocm path is _prefix
-sed -i -e 's@/opt/rocm@%{_prefix}@' amd/hipcc/bin/hipvars.pm
-sed -i -e 's@/opt/rocm@%{_prefix}@' amd/hipcc/src/hipBin_base.h
+sed -i -e 's@/opt/rocm@%{pkg_prefix}@' amd/hipcc/src/hipBin_base.h
LLVM_BINDIR=%{bundle_prefix}/bin
-echo "s@\$ROCM_PATH/lib/llvm/bin@${LLVM_BINDIR}@" > pm.sed
-sed -i -f pm.sed amd/hipcc/bin/hipvars.pm
-
echo "s@hipClangPath /= \"lib/llvm/bin\"@hipClangPath = \"${LLVM_BINDIR}\"@" >
h.sed
sed -i -f h.sed amd/hipcc/src/hipBin_amd.h
+#
+# Device libs path
# Fix up the path to the device libs hipcc uses
-sed -i -e 's@amdgcnBitcode = roccmPath@amdgcnBitcode =
"%{_prefix}/%{amd_device_libs_prefix}/"@' amd/hipcc/src/hipBin_amd.h
-
+sed -i -e 's@amdgcnBitcode = roccmPath@amdgcnBitcode =
"%{amd_device_libs_prefix}/"@' amd/hipcc/src/hipBin_amd.h
# Fix up the location AMD_DEVICE_LIBS_PREFIX
-sed -i 's|@AMD_DEVICE_LIBS_PREFIX_CODE@|set(AMD_DEVICE_LIBS_PREFIX
"%{_prefix}/%{amd_device_libs_prefix}")|'
amd/device-libs/AMDDeviceLibsConfig.cmake.in
+sed -i 's|@AMD_DEVICE_LIBS_PREFIX_CODE@|set(AMD_DEVICE_LIBS_PREFIX
"%{amd_device_libs_prefix}")|' amd/device-libs/AMDDeviceLibsConfig.cmake.in
+# // Find device libraries in <LLVM_DIR>/lib/clang/<ver>/lib/amdgcn/bitcode
+# LibDevicePath = D.ResourceDir;
+# llvm::sys::path::append(LibDevicePath, CLANG_INSTALL_LIBDIR_BASENAME,
+# "amdgcn", "bitcode");
+# Make sure CLANG_INSTALL_LIBDIR_BASENAME is lib and not lib64
+sed -i 's@LibDevicePath, CLANG_INSTALL_LIBDIR_BASENAME,@LibDevicePath,
"lib",@' clang/lib/Driver/ToolChains/AMDGPU.cpp
+
+# Change out looking for /opt/rocm-X.Y to looking for usr/lib64/rocm/rocm-X.Y
+# File = D.getVFS().dir_begin(D.SysRoot + "/opt", EC),
+sed -i '[email protected] + "/opt", [email protected] + "%{pkg_prefix}", EC@'
clang/lib/Driver/ToolChains/AMDGPU.cpp
+# ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/" + LatestROCm,
+sed -i '[email protected] + "/opt/" + [email protected] + "%{pkg_prefix}" +
LatestROCm@' clang/lib/Driver/ToolChains/AMDGPU.cpp
+
# default hash to both
sed -i 's@gnuHash = false@gnuHash = true@' lld/ELF/Config.h