Bug 277902
Summary: | [GCC] Add custom implementation of std::bit_cast for systems not supporting it | ||
---|---|---|---|
Product: | WebKit | Reporter: | Diego Pino <dpino> |
Component: | New Bugs | Assignee: | Diego Pino <dpino> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | bugs-noreply, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=277672 |
Diego Pino
Changeset 281895@main introduced a non-conditional use of `std::bit_cast`. This broke the build for many Linux systems lacking support for this function.
https://build.webkit.org/#/builders/992/builds/4591/steps/9/logs/stdio
```
/home/buildbot/worker/GTK-Linux-64-bit-Release-Debian-11-Build/build/Source/WTF/wtf/Float16.h:59:36: error: no member named 'bit_cast' in namespace 'std'
return static_cast<float>(std::bit_cast<_Float16>(h));
```
`std::bit_cast` is implemented since libstdc++-11, so Linux systems still using libstdc++-10 are affected by this build break. Switching the compiler to clang doesn't solve this issue since the version of libstdc++ distributed in the OS is still used (in fact, Debian 11 bot is already using clang).
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Diego Pino
Pull request: https://github.com/webkit/webkit/pull/31987
Radar WebKit Bug Importer
<rdar://problem/134122800>
Diego Pino
WebKit upstream is no longer supporting builds with libstdc++-10. Those would who like to build with such setting should apply the patch in the pull-request downstream.