diff mbox series

arm/optee: disable clang due to breakage

Message ID 20240318023558.85348-1-jon.mason@arm.com
State New
Headers show
Series arm/optee: disable clang due to breakage | expand

Commit Message

Jon Mason March 18, 2024, 2:35 a.m. UTC
With clang 18, optee-os no longer compiles cleanly.  It is now seeing:

| In file included from core/arch/arm/kernel/vfp.c:6:
| In file included from core/arch/arm/include/arm.h:131:
| core/arch/arm/include/arm64.h:436:1: error: expected readable system
register
|   436 | DEFINE_U32_REG_READWRITE_FUNCS(fpcr)
|       | ^
| core/arch/arm/include/arm64.h:417:3: note: expanded from macro
'DEFINE_U32_REG_READWRITE_FUNCS'
|   417 |                 DEFINE_U32_REG_READ_FUNC(reg)   \
|       |                 ^
| core/arch/arm/include/arm64.h:411:3: note: expanded from macro
'DEFINE_U32_REG_READ_FUNC'
|   411 |                 DEFINE_REG_READ_FUNC_(reg, uint32_t, reg)
|       |                 ^
| core/arch/arm/include/arm64.h:398:15: note: expanded from macro
'DEFINE_REG_READ_FUNC_'
|   398 |         asm volatile("mrs %0, " #asmreg : "=r" (val64));
\
|       |                      ^
| <inline asm>:1:10: note: instantiated into assembly here
|     1 |         mrs x8, fpcr
|       |                 ^

Issues are also seen on optee-examples and optee-test.
Forcing GCC for all optee recipes until this issue can be resolved.

Signed-off-by: Jon Mason <jon.mason@arm.com>
---
 meta-arm/recipes-security/optee/optee.inc | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jon Mason March 18, 2024, 6:25 p.m. UTC | #1
On Sun, 17 Mar 2024 22:35:58 -0400, Jon Mason wrote:
> With clang 18, optee-os no longer compiles cleanly.  It is now seeing:
> 
> | In file included from core/arch/arm/kernel/vfp.c:6:
> | In file included from core/arch/arm/include/arm.h:131:
> | core/arch/arm/include/arm64.h:436:1: error: expected readable system
> register
> |   436 | DEFINE_U32_REG_READWRITE_FUNCS(fpcr)
> |       | ^
> | core/arch/arm/include/arm64.h:417:3: note: expanded from macro
> 'DEFINE_U32_REG_READWRITE_FUNCS'
> |   417 |                 DEFINE_U32_REG_READ_FUNC(reg)   \
> |       |                 ^
> | core/arch/arm/include/arm64.h:411:3: note: expanded from macro
> 'DEFINE_U32_REG_READ_FUNC'
> |   411 |                 DEFINE_REG_READ_FUNC_(reg, uint32_t, reg)
> |       |                 ^
> | core/arch/arm/include/arm64.h:398:15: note: expanded from macro
> 'DEFINE_REG_READ_FUNC_'
> |   398 |         asm volatile("mrs %0, " #asmreg : "=r" (val64));
> \
> |       |                      ^
> | <inline asm>:1:10: note: instantiated into assembly here
> |     1 |         mrs x8, fpcr
> |       |                 ^
> 
> [...]

Applied, thanks!

[1/1] arm/optee: disable clang due to breakage
      commit: 67901eb5cbb774f5eac69374ee75b6dddac893c6

Best regards,
diff mbox series

Patch

diff --git a/meta-arm/recipes-security/optee/optee.inc b/meta-arm/recipes-security/optee/optee.inc
index af391f3922b0..1569a9df3bd4 100644
--- a/meta-arm/recipes-security/optee/optee.inc
+++ b/meta-arm/recipes-security/optee/optee.inc
@@ -15,6 +15,9 @@  OPTEE_ARCH:arm = "arm32"
 OPTEE_ARCH:aarch64 = "arm64"
 OPTEE_CORE = "${@d.getVar('OPTEE_ARCH').upper()}"
 
+# FIXME - breaks with Clang 18.  See https://github.com/OP-TEE/optee_os/issues/6754
+TOOLCHAIN = "gcc"
+
 OPTEE_TOOLCHAIN = "${@d.getVar('TOOLCHAIN') or 'gcc'}"
 OPTEE_COMPILER = "${@bb.utils.contains("BBFILE_COLLECTIONS", "clang-layer", "${OPTEE_TOOLCHAIN}", "gcc", d)}"