Skip to content

Commit f8e620a

Browse files
Scottcjnclaude
andcommitted
Add -flax-vector-conversions for PowerPC AltiVec/VSX HACL build
GCC with -std=c11 and -maltivec treats 'bool' as '__vector __bool int' in certain struct access patterns, causing type errors in the HACL* BLAKE2 SIMD128 code. Adding -flax-vector-conversions resolves this without affecting code generation. Verified on IBM POWER8 S824 with GCC 10.5 — HACL Blake2s_Simd128.c now compiles cleanly with this flag. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent db4bdde commit f8e620a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

configure

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8133,7 +8133,7 @@ then
81338133
dnl x86 SSE not available; check for PowerPC AltiVec/VSX (Power8+).
81348134
dnl HACL* libintvector.h has a complete vec128 implementation for __powerpc64__.
81358135
AX_CHECK_COMPILE_FLAG([-maltivec -mvsx],[
8136-
[LIBHACL_SIMD128_FLAGS="-maltivec -mvsx"]
8136+
[LIBHACL_SIMD128_FLAGS="-maltivec -mvsx -flax-vector-conversions"]
81378137
81388138
AC_DEFINE([_Py_HACL_CAN_COMPILE_VEC128], [1], [
81398139
HACL* library can compile SIMD128 implementations])

0 commit comments

Comments
 (0)