Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libclc for openSUSE:Factory checked in at 2026-08-28 19:46:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libclc (Old) and /work/SRC/openSUSE:Factory/.libclc.new.1265 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libclc" Fri Aug 28 19:46:25 2026 rev:39 rq:1373932 version:0.2.0+llvm22.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libclc/libclc.changes 2026-05-04 12:49:00.854355896 +0200 +++ /work/SRC/openSUSE:Factory/.libclc.new.1265/libclc.changes 2026-08-28 19:46:29.219098695 +0200 @@ -1,0 +2,13 @@ +Sun Jul 26 21:07:35 UTC 2026 - Aaron Puchert <[email protected]> + +- Add mark-clc-flush-denormal-if-not-supported-as-static.patch to + work around missing definition errors. +- Tell CMake where to find the compiler if versioned Clang/LLVM is + used. (However, that compiler isn't actually used for the build.) +- Add cmake-use-imported-targets.patch to make the build use the + imported targets. This ensures we're picking up the right tools + when versioned Clang/LLVM is used. +- Rewrite fix-subnormal-build.patch with upstream git root as base. +- Fix list of targets for SLE/Leap 15.x. + +------------------------------------------------------------------- New: ---- cmake-use-imported-targets.patch mark-clc-flush-denormal-if-not-supported-as-static.patch ----------(New B)---------- New: used. (However, that compiler isn't actually used for the build.) - Add cmake-use-imported-targets.patch to make the build use the imported targets. This ensures we're picking up the right tools New: - Add mark-clc-flush-denormal-if-not-supported-as-static.patch to work around missing definition errors. ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libclc.spec ++++++ --- /var/tmp/diff_new_pack.a8wpo5/_old 2026-08-28 19:46:30.631148051 +0200 +++ /var/tmp/diff_new_pack.a8wpo5/_new 2026-08-28 19:46:30.633148121 +0200 @@ -20,6 +20,10 @@ %define _version %_libclc_llvm_ver%{?_rc:rc%_rc} %define _tagver %_libclc_llvm_ver%{?_rc:-rc%_rc} +%if 0%{?suse_version} < 1699 +%global _clang_version 22 +%endif + Name: libclc Version: 0.2.0+llvm%{_libclc_llvm_ver}%{?_rc:~rc%_rc} Release: 0 @@ -33,14 +37,11 @@ Source100: %{name}-rpmlintrc Source101: https://releases.llvm.org/release-keys.asc#/%{name}.keyring Patch1: fix-subnormal-build.patch +Patch2: mark-clc-flush-denormal-if-not-supported-as-static.patch +Patch3: cmake-use-imported-targets.patch +BuildRequires: clang%{?_clang_version}-devel BuildRequires: cmake -%if 0%{?suse_version} >= 1699 -BuildRequires: clang-devel -BuildRequires: llvm-devel -%else -BuildRequires: clang22-devel -BuildRequires: llvm22-devel -%endif +BuildRequires: llvm%{?_clang_version}-devel BuildRequires: python3-base BuildRequires: pkgconfig(LLVMSPIRVLib) Provides: libclc(llvm%{_llvm_sonum}) @@ -51,17 +52,17 @@ %prep %setup -q -n libclc-%{_version}.src -%autopatch +%autopatch -p2 %build # The libraries are bitcode files, so LTO is neither supported nor does it help. %define _lto_cflags %{nil} %cmake \ - -DCMAKE_C_COMPILER=clang \ - -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_C_COMPILER=clang%{?_clang_version:-%{_clang_version}} \ + -DCMAKE_CXX_COMPILER=clang++%{?_clang_version:-%{_clang_version}} \ %if 0%{?suse_version} < 1550 - -DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;amdgcn-mesa-mesa3d;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl" \ + -DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn-amd-amdhsa;amdgcn-mesa-mesa3d;r600--;nvptx64--;nvptx64--nvidiacl;nvptx64-nvidia-cuda" \ %endif -DENABLE_RUNTIME_SUBNORMAL:BOOL=ON %cmake_build ++++++ cmake-use-imported-targets.patch ++++++ Use imported targets as tools instead of trying to find them. Sometimes these are versioned binaries, but the CMake package definitions knows where to find them. diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt index c17b350..9a28d58 100644 --- a/libclc/CMakeLists.txt +++ b/libclc/CMakeLists.txt @@ -63,6 +63,7 @@ if( LIBCLC_STANDALONE_BUILD OR CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DI set( LIBCLC_STANDALONE_BUILD TRUE ) find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}") + find_package(Clang REQUIRED) include(AddLLVM) message( STATUS "libclc LLVM version: ${LLVM_PACKAGE_VERSION}" ) @@ -74,8 +75,7 @@ if( LIBCLC_STANDALONE_BUILD OR CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DI # Import required tools if( NOT EXISTS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} ) foreach( tool IN ITEMS clang llvm-as llvm-link opt ) - find_program( LLVM_TOOL_${tool} ${tool} PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH ) - set( ${tool}_exe ${LLVM_TOOL_${tool}} ) + set( ${tool}_exe ${tool} ) set( ${tool}_target ) endforeach() endif() @@ -134,12 +134,6 @@ if( EXISTS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} ) endforeach() endif() -foreach( tool IN ITEMS clang opt llvm-as llvm-link ) - if( NOT EXISTS "${${tool}_exe}" AND "${${tool}_target}" STREQUAL "" ) - message( FATAL_ERROR "libclc toolchain incomplete - missing tool ${tool}!" ) - endif() -endforeach() - if( NOT LIBCLC_USE_SPIRV_BACKEND ) # llvm-spirv is an optional dependency, used to build spirv-* targets when # the SPIR-V backend hasn't been requested. It may be provided in-tree or ++++++ fix-subnormal-build.patch ++++++ --- /var/tmp/diff_new_pack.a8wpo5/_old 2026-08-28 19:46:30.733151617 +0200 +++ /var/tmp/diff_new_pack.a8wpo5/_new 2026-08-28 19:46:30.743151966 +0200 @@ -5,10 +5,10 @@ [...]/opencl/lib/generic/subnormal_use_default.ll error: Permission denied -diff --git a/CMakeLists.txt b/CMakeLists.txt +diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt index d060b71..c17b350 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt +--- a/libclc/CMakeLists.txt ++++ b/libclc/CMakeLists.txt @@ -239,6 +239,7 @@ configure_file( libclc.pc.in libclc.pc @ONLY ) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libclc.pc DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig" ) ++++++ mark-clc-flush-denormal-if-not-supported-as-static.patch ++++++ >From 4ee4864ec296d9dc07f0919f18a0c03c19083b1b Mon Sep 17 00:00:00 2001 From: Karol Herbst <[email protected]> Date: Thu, 2 Jul 2026 21:44:04 +0200 Subject: [PATCH] [libclc] mark __clc_flush_denormal_if_not_supported as static inline The compiled SPIR-V libclc binaries ended up with an empty definition for __clc_flush_denormal_if_not_supported. b8a5888d8d32 ("[libclc] Fix memory fence scope mapping for OpenCL (#170542)") also added the static keyword probably due to the same issue. Fixes: 7f3661128b1e ("[libclc] Remove __attribute__((always_inline)) (#158791)") --- libclc/clc/include/clc/math/math.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libclc/clc/include/clc/math/math.h b/libclc/clc/include/clc/math/math.h index c2647f66b4006..b6a2c864d522a 100644 --- a/libclc/clc/include/clc/math/math.h +++ b/libclc/clc/include/clc/math/math.h @@ -65,7 +65,7 @@ bool __attribute__((noinline)) __clc_runtime_has_hw_fma32(void); #define LOG_MAGIC_NUM_SP32 (1 + NUMEXPBITS_SP32 - EXPBIAS_SP32) -_CLC_OVERLOAD _CLC_INLINE float __clc_flush_denormal_if_not_supported(float x) { +_CLC_OVERLOAD static _CLC_INLINE float __clc_flush_denormal_if_not_supported(float x) { int ix = __clc_as_int(x); if (!__clc_fp32_subnormals_supported() && ((ix & EXPBITS_SP32) == 0) && ((ix & MANTBITS_SP32) != 0)) {
