fix build on i386 without SSE2 #302
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Commit 3cba6b1 ("Use _Float16 for half conversions if available") added support for using half-width float support in the compiler to perform encoding operations, using the FLT16_MANT_DIG macro to check for support on the given target.
However, on x86 GCC only supports this when SSE2 is enabled[1]. Unlike clang and the other architectures where support for this is conditional, GCC does define those macros even without SSE2 support, causing a build failure:
Work around this by additionally checking for this specific condition.
[1] https://gcc.gnu.org/onlinedocs/gcc/Half-Precision.html