summaryrefslogtreecommitdiff
path: root/cipher/chacha20-ppc.c
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/chacha20-ppc.c')
-rw-r--r--cipher/chacha20-ppc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cipher/chacha20-ppc.c b/cipher/chacha20-ppc.c
index 3fe7bc8c..243c12ff 100644
--- a/cipher/chacha20-ppc.c
+++ b/cipher/chacha20-ppc.c
@@ -657,7 +657,10 @@ chacha20_poly1305_ppc_blocks4(u32 *state, byte *dst, const byte *src,
# define FUNC_ATTR_OPT_O2
#endif
-#ifdef HAVE_GCC_ATTRIBUTE_PPC_TARGET
+#if defined(__clang__) && defined(HAVE_CLANG_ATTRIBUTE_PPC_TARGET)
+# define FUNC_ATTR_TARGET_P8 __attribute__((target("arch=pwr8")))
+# define FUNC_ATTR_TARGET_P9 __attribute__((target("arch=pwr9")))
+#elif defined(HAVE_GCC_ATTRIBUTE_PPC_TARGET)
# define FUNC_ATTR_TARGET_P8 __attribute__((target("cpu=power8")))
# define FUNC_ATTR_TARGET_P9 __attribute__((target("cpu=power9")))
#else