Skip to contentSkip to conversation

arm-bsp/secure-partitions: fix build with GCC 11.4

PATCH Applied [email protected] 2 participants 2 messages Aug 24, 2023 – Aug 26, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm-bsp/secure-partitions: fix build with GCC 11.4

From: Ross Burton <[email protected]>

GCC 11.4 has improved code generation and needs the __aarch64_cas4_sync intrinsic from libgcc, but one of the modules here doesn't link to libgcc.

---
 ...7-Add-openamp-to-SE-proxy-deployment.patch | 25 +++++++++++++------
 1 file changed, 17 insertions(+), 8 deletions(-)
meta-arm-bsp/recipes-security/trusted-services/secure-partitions/corstone1000/0007-Add-openamp-to-SE-proxy-deployment.patch +17 -8
index 06fb4979..3cb44aaf 100644
@@ -53,7 +53,7 @@ new file mode 100644
 index 0000000..840683a
 --- /dev/null
 +++ b/deployments/se-proxy/opteesp/lse.S
-@@ -0,0 +1,19 @@
+@@ -0,0 +1,28 @@
 +// SPDX-License-Identifier: BSD-3-Clause
 +/*
 + * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
@@ -61,18 +61,27 @@ index 0000000..840683a
 +
 +.text
 +.globl __aarch64_cas4_acq_rel
++.globl __aarch64_cas4_sync
 +
 +__aarch64_cas4_acq_rel:
-+	mov	w16, w0
-+	ldaxr	w0, [x2]
-+	cmp	w0, w16
-+0:	bne	1f
++       mov     w16, w0
++       ldaxr   w0, [x2]
++       cmp     w0, w16
++0:     bne     1f
 +
-+	stlxr	w17, w1, [x2]
-+	cbnz	w17, 0b
-+1:	ret
++       stlxr   w17, w1, [x2]
++       cbnz    w17, 0b
++1:     ret
 +
++__aarch64_cas4_sync:
++       mov     w16, w0
++       ldxr    w0, [x2]
++       cmp     w0, w16
++0:     bne     1f
 +
++       stlxr   w17, w1, [x2]
++       cbnz    w17, 0b
++1:     ret
 diff --git a/external/openamp/libmetal.cmake b/external/openamp/libmetal.cmake
 new file mode 100644
 index 0000000..3a647e6
Signature · 1 line
2.34.1
Applied
#1 lore raw
Quoted 5 lines · On Thu, 24 Aug 2023 15:53:03 +0100, [email protected] wrote:

GCC 11.4 has improved code generation and needs the __aarch64_cas4_sync intrinsic from libgcc, but one of the modules here doesn't link to libgcc.

Applied, thanks!

[1/1] arm-bsp/secure-partitions: fix build with GCC 11.4

      commit: b187fb9232ca0a6b5f8f90b4715958546fc41d73

Best regards,

Signature · 1 line
Jon Mason <[email protected]>