aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/mbedtls/mbedtls/0002-aesce-use-correct-target-attribute-when-building-wit.patch
blob: 4775c8ddb77a68329cba328f8d39a488b3ebf0c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 03d3523f974536f2358047382aadb0d4cc762f8a Mon Sep 17 00:00:00 2001
From: Beniamin Sandu <beniaminsandu@gmail.com>
Date: Mon, 26 Jun 2023 12:07:21 +0300
Subject: [PATCH] aesce: use correct target attribute when building with clang

Seems clang has its own issues when it comes to crypto extensions,
and right now the best way to avoid them is to accurately enable
the needed instructions instead of the broad crypto feature.

E.g.: https://github.com/llvm/llvm-project/issues/61645

Upstream-Status: Pending

Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com>
---
 library/aesce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/aesce.c b/library/aesce.c
index 843de3973..7bea088ba 100644
--- a/library/aesce.c
+++ b/library/aesce.c
@@ -53,7 +53,7 @@
 #       if __clang_major__ < 4
 #           error "A more recent Clang is required for MBEDTLS_AESCE_C"
 #       endif
-#       pragma clang attribute push (__attribute__((target("crypto"))), apply_to=function)
+#       pragma clang attribute push (__attribute__((target("aes"))), apply_to=function)
 #       define MBEDTLS_POP_TARGET_PRAGMA
 #   elif defined(__GNUC__)
 #       if __GNUC__ < 6
-- 
2.25.1