Summary: | REGRESSION(278410@main): Fails to build with clang: error: _Float16 is not supported on this target | ||
---|---|---|---|
Product: | WebKit | Reporter: | Alberto Garcia <berto> |
Component: | WebKitGTK | Assignee: | Michael Catanzaro <mcatanzaro> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | berto, bugs-noreply, mcatanzaro, ysuzuki |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Description
Alberto Garcia
2024-05-13 07:29:20 PDT
I can reproduce on s390x. This blocks updating to 2.45.1/2.45.2. At first I thought "surely wtf/simde/arm is not supposed to be built on non-ARM architectures" but actually it is; it's intended to provide the ARM APIs on non-ARM architectures. It seems the preprocessor tests in simde-f16.h will need some work. The problem is this branch https://github.com/simd-everywhere/simde/blob/f046ab773733f09edaadec30345b592dfe85368e/simde/simde-f16.h#L86 is being taken improperly, for unknown reasons. The condition is very complex. I don't see this on i686. Maybe the i386 vs. i686 microarchitecture difference is relevant. (In reply to Michael Catanzaro from comment #2) > I don't see this on i686. Maybe the i386 vs. i686 microarchitecture > difference is relevant. I've been checking the GCC [1][2] and Clang [3] manuals, and the difference must be SSE2 instruction set. Debian probably does not enable it. Fedora does. [1] https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html [2] https://gcc.gnu.org/onlinedocs/gcc/Half-Precision.html [3] https://clang.llvm.org/docs/LanguageExtensions.html#half-precision-floating-point > the difference must be SSE2 instruction set. Debian probably does not enable it Oh, I see, the i386 baseline in Debian is i686, which does not include SSE: https://wiki.debian.org/ArchitectureSpecificsMemo#i386-1 When this started to cause problems with WebKitGTK I disabled anything that would produce such code. The idea was that all PC users should switch to a 64-bit OS, and anyone who was still running the 32-bit version was probably running very old hardware so compatibility was more important than performance. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930935 I think it's broken only when using Clang rather than GCC. I've created a pull request at https://github.com/simd-everywhere/simde/pull/1182. There is a *lot* of upstream CI and I'm not expecting it all to pass; we'll see how it goes. Berto, give this a try please: diff --git a/Source/WTF/wtf/simde/arm/neon.h b/Source/WTF/wtf/simde/arm/neon.h index 1ecd8cf565f1..b6d0fdf4f5d1 100644 --- a/Source/WTF/wtf/simde/arm/neon.h +++ b/Source/WTF/wtf/simde/arm/neon.h @@ -8785,8 +8785,7 @@ SIMDE_BEGIN_DECLS_ defined(SIMDE_X86_AVX512FP16_NATIVE) || \ (defined(SIMDE_ARCH_X86_SSE2) && HEDLEY_GCC_VERSION_CHECK(12,0,0)) || \ (defined(SIMDE_ARCH_AARCH64) && HEDLEY_GCC_VERSION_CHECK(7,0,0) && !defined(__cplusplus)) || \ - ((defined(SIMDE_ARCH_X86) || defined(SIMDE_ARCH_AMD64)) && SIMDE_DETECT_CLANG_VERSION_CHECK(15,0,0)) || \ - (!(defined(SIMDE_ARCH_X86) || defined(SIMDE_ARCH_AMD64)) && SIMDE_DETECT_CLANG_VERSION_CHECK(6,0,0))) || \ + ((defined(SIMDE_ARCH_X86_SSE2) || defined(SIMDE_ARCH_AMD64)) && SIMDE_DETECT_CLANG_VERSION_CHECK(15,0,0))) || \ defined(SIMDE_ARCH_RISCV_ZVFH) /* We haven't found a better way to detect this. It seems like defining * __STDC_WANT_IEC_60559_TYPES_EXT__, then including float.h, then > Berto, give this a try please
Tested in Debian experimental i386, it builds and works fine (on a VM at least).
Pull request: https://github.com/WebKit/WebKit/pull/28597 Committed 278821@main (3b302c530534): <https://commits.webkit.org/278821@main> Reviewed commits have been landed. Closing PR #28597 and removing active labels. |