fix(autopatch): Rewrote config.yaml to match updated llvm spec structure: replaced failing '%if %{maj_ver} >=18 / %global cfg_file_conte #2

Merged
eabdullin merged 1 commits from agent-fix/a10-20260520-000928 into a10 2026-05-20 10:50:34 +00:00

View File

@ -2,19 +2,23 @@ actions:
- replace:
- target: "spec"
find: |
%if %{maj_ver} >=18
%global cfg_file_content --gcc-triple=%{_target_cpu}-redhat-linux
%global gcc_triple --gcc-triple=%{_target_cpu}-redhat-linux
replace: |
%if %{maj_ver} >=18
%ifarch x86_64_v2
%global cfg_file_content --gcc-triple=x86_64-redhat-linux
%global gcc_triple --gcc-triple=x86_64-redhat-linux
%else
%global cfg_file_content --gcc-triple=%{_target_cpu}-redhat-linux
%global gcc_triple --gcc-triple=%{_target_cpu}-redhat-linux
%endif
count: 1
- target: "spec"
find: "BPF;WebAssembly"
replace: "BPF;WebAssembly;RISCV"
find: |
%global cfg_file_content %{cfg_file_content} --gcc-install-dir=/opt/rh/gcc-toolset-%{gts_version}/root/%{_exec_prefix}/lib/gcc/%{_target_cpu}-redhat-linux/%{gts_version}
replace: |
%ifarch x86_64_v2
%global cfg_file_content %{cfg_file_content} --gcc-install-dir=/opt/rh/gcc-toolset-%{gts_version}/root/%{_exec_prefix}/lib/gcc/x86_64-redhat-linux/%{gts_version}
%else
%global cfg_file_content %{cfg_file_content} --gcc-install-dir=/opt/rh/gcc-toolset-%{gts_version}/root/%{_exec_prefix}/lib/gcc/%{_target_cpu}-redhat-linux/%{gts_version}
%endif
count: 1
- target: "spec"
find: |
@ -32,33 +36,6 @@ actions:
%ifarch aarch64 riscv64
%define _find_debuginfo_dwz_opts %{nil}
count: 1
- target: "spec"
find: |
#region llvm options
replace: |
%global runtimes compiler-rt;openmp
%ifnarch riscv64
%global runtimes %{runtimes};offload
%endif
#region llvm options
count: 1
- target: "spec"
find: "-DLLVM_ENABLE_RUNTIMES=\"compiler-rt;openmp;offload\""
replace: "-DLLVM_ENABLE_RUNTIMES=\"%{runtimes}\""
count: 1
- target: "spec"
find: |
%ifnarch %{ix86}
# Remove files that we don't package, yet.
%if %{maj_ver} >= 20
rm %{buildroot}%{install_bindir}/llvm-offload-device-info
replace: |
%ifnarch %{ix86} riscv64
# Remove files that we don't package, yet.
%if %{maj_ver} >= 20
rm %{buildroot}%{install_bindir}/llvm-offload-device-info
count: 1
- target: "spec"
find: |
%cmake_build --target check-lit
@ -84,9 +61,9 @@ actions:
export LIT_XFAIL="$LIT_XFAIL;OpenMP/declare_variant_device_isa_codegen_1.c"
test_list_filter_out+=("Clang :: OpenMP/declare_variant_device_isa_codegen_1.c")
%endif
export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out)
%ifnarch riscv64
%cmake_build --target check-clang
%endif
@ -99,16 +76,6 @@ actions:
%cmake_build --target check-clang-tools
%endif
count: 1
- target: "spec"
find: |
%ifnarch s390x
%cmake_build --target check-openmp
%endif
replace: |
%ifnarch s390x riscv64
%cmake_build --target check-openmp
%endif
count: 1
- target: "spec"
find: |
%cmake_build --target check-lld
@ -117,22 +84,6 @@ actions:
%cmake_build --target check-lld
%endif
count: 1
- target: "spec"
find: |
%ifnarch %{ix86} s390x
%{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/liborc_rt.a
replace: |
%ifnarch %{ix86} s390x riscv64
%{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/liborc_rt.a
count: 1
- target: "spec"
find: |
%ifnarch %{ix86}
# libomptarget is not supported on 32-bit systems.
replace: |
%ifnarch %{ix86} riscv64
# libomptarget is not supported on 32-bit systems.
count: 2
- modify_release:
- suffix: ".alma.1"
@ -142,5 +93,5 @@ actions:
- name: "Eduard Abdullin"
email: "eabdullin@almalinux.org"
line:
- "Use x86_64-redhat-linux as default gcc triple for x86_64_v2"
- "AlmaLinux change: Use x86_64-redhat-linux as default gcc triple for x86_64_v2"
- "Add riscv64 support"