Skip to content

Commit ba85c89

Browse files
committed
Fix issue #227 (compile error with clang 22)
For whatever reason the original libaegis code specified a target option "evex512" for clang version 18 and higher. While clang 18 ignored the unknown option, clang 22 (and most likely other versions between 18 and 22) complained about the unknown option and ignores ALL target options. This leads to hard compile errors later on. The solution is to simply drop the invalid target option.
1 parent e4b6174 commit ba85c89

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/aegis/aegis128x4/aegis128x4_avx512.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,8 @@
2323
#ifdef HAVE_VAESINTRIN_H
2424

2525
#ifdef __clang__
26-
# if __clang_major__ >= 18
27-
# pragma clang attribute push(__attribute__((target("vaes,avx512f,evex512"))), \
26+
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
2827
apply_to = function)
29-
# else
30-
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
31-
apply_to = function)
32-
# endif
3328
#elif defined(__GNUC__)
3429
# pragma GCC target("vaes,avx512f")
3530
#endif

src/aegis/aegis256x4/aegis256x4_avx512.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,8 @@
2323
#ifdef HAVE_VAESINTRIN_H
2424

2525
#ifdef __clang__
26-
# if __clang_major__ >= 18
27-
# pragma clang attribute push(__attribute__((target("vaes,avx512f,evex512"))), \
26+
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
2827
apply_to = function)
29-
# else
30-
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
31-
apply_to = function)
32-
# endif
3328
#elif defined(__GNUC__)
3429
# pragma GCC target("vaes,avx512f")
3530
#endif

0 commit comments

Comments
 (0)