[Bug 293293] devel/spirv-llvm-translator: fix build of llvm12 flavor with clang 21
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 19 Feb 2026 12:31:14 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293293
Bug ID: 293293
Summary: devel/spirv-llvm-translator: fix build of llvm12
flavor with clang 21
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: jbeich@FreeBSD.org
Reporter: dim@FreeBSD.org
Flags: maintainer-feedback?(jbeich@FreeBSD.org)
Assignee: jbeich@FreeBSD.org
With clang 21 the llvm12 flavor of devel/spirv-llvm-translator fails to
build, with errors similar to:
In file included from
/wrkdirs/usr/ports/devel/spirv-llvm-translator/work-llvm12/SPIRV-LLVM-Translator-12.0.1/lib/SPIRV/OCLTypeToSPIRV.cpp:44:
In file included from
/wrkdirs/usr/ports/devel/spirv-llvm-translator/work-llvm12/SPIRV-LLVM-Translator-12.0.1/lib/SPIRV/OCLUtil.h:42:
In file included from
/wrkdirs/usr/ports/devel/spirv-llvm-translator/work-llvm12/SPIRV-LLVM-Translator-12.0.1/lib/SPIRV/SPIRVInternal.h:43:
In file included from
/wrkdirs/usr/ports/devel/spirv-llvm-translator/work-llvm12/SPIRV-LLVM-Translator-12.0.1/lib/SPIRV/libSPIRV/SPIRVEnum.h:44:
In file included from
/wrkdirs/usr/ports/devel/spirv-llvm-translator/work-llvm12/SPIRV-LLVM-Translator-12.0.1/lib/SPIRV/libSPIRV/SPIRVOpCode.h:45:
/wrkdirs/usr/ports/devel/spirv-llvm-translator/work-llvm12/SPIRV-LLVM-Translator-12.0.1/lib/SPIRV/libSPIRV/spirv_internal.hpp:120:31:
error: constexpr variable 'FunctionControlOptNoneINTELMask' must be initialized
by a constant expression
120 | constexpr FunctionControlMask FunctionControlOptNoneINTELMask =
| ^
121 |
static_cast<FunctionControlMask>(IFunctionControlOptNoneINTELMask);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/devel/spirv-llvm-translator/work-llvm12/SPIRV-LLVM-Translator-12.0.1/lib/SPIRV/libSPIRV/spirv_internal.hpp:121:5:
note: integer value 65536 is outside the valid range of values [0, 15] for the
enumeration type 'FunctionControlMask'
121 |
static_cast<FunctionControlMask>(IFunctionControlOptNoneINTELMask);
| ^
This is because clang 21 no longer allows enum values outside of the
valid range. Upstream spirv refactored a lot in this area, so the llvm13
flavor and later compile fine with clang 21.
Fix it by explicitly making the underlying type for the two affected
enums uint32_t.
--
You are receiving this mail because:
You are the assignee for the bug.