| Issue |
183400
|
| Summary |
libclc SPIRV backend Unresolved external reference to "_Z37__clc_flush_denormal_if_not_supportedf"
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
FireBurn
|
When building libclc 21.1.0 using the SPRIV backend I get the following error:
```
FAILED: [code=1] spirv-mesa3d-.spv /var/tmp/portage/llvm-core/libclc-22.1.0-r1/work/libclc_build/spirv-mesa3d-.spv
cd /var/tmp/portage/llvm-core/libclc-22.1.0-r1/work/libclc_build && /usr/lib/llvm/22/bin/clang --target=spirv32-- -x ir -o /var/tmp/portage/llvm-core/libclc-22.1.0-r1/work/libclc_build/spirv-mesa3d-.spv /var/tmp/portage/llvm-core/libclc-22.1.0-r1/work/
libclc_build/obj.libclc.dir/spirv-mesa3d-/builtins.link.spirv-mesa3d-.bc
error: 0: Unresolved external reference to "_Z37__clc_flush_denormal_if_not_supportedf".
```
I can work around it using:
```
diff --git a/libclc/clc/include/clc/math/math.h b/libclc/clc/include/clc/math/math.h
index c2647f66b400..b6a2c864d522 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)) {
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs