Skip to contentSkip to conversation

arm/optee: remove redundant libgcc flags

PATCH Applied Ross Burton 2 participants 3 messages Sep 29, 2025 – Sep 30, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arm/optee: remove redundant libgcc flags

Upstream appear to have resolved the libgcc linkage issues as these variables are not used in upstream nor our patches.

---
 meta-arm/recipes-security/optee/optee-os.inc | 4 ----
 meta-arm/recipes-security/optee/optee.inc    | 1 -
 2 files changed, 5 deletions(-)
meta-arm/recipes-security/optee/optee-os.inc +0 -4
index 3065f71f6e..41eb6d1f32 100644
@@ -38,10 +38,6 @@ CPPFLAGS[unexport] = "1"
 AS[unexport] = "1"
 LD[unexport] = "1"
 
-do_compile:prepend() {
-	PLAT_LIBGCC_PATH=$(${CC} -print-libgcc-file-name)
-}
-
 do_compile() {
     oe_runmake -C ${S} all
 }
meta-arm/recipes-security/optee/optee.inc +0 -1
index 5f01570fcf..a7d64af56a 100644
@@ -24,7 +24,6 @@ OPTEE_COMPILER = "${@bb.utils.contains("BBFILE_COLLECTIONS", "clang-layer", "${O
 TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta"
 
 EXTRA_OEMAKE += "V=1 \
-                 LIBGCC_LOCATE_CFLAGS='${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \
                  COMPILER=${OPTEE_COMPILER} \
                  OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}${prefix} \
                  TEEC_EXPORT=${STAGING_DIR_HOST}${prefix} \
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/2 arm/optee: clean up OPTEE_COMPILER assignment

Now that clang is part of oe-core we can't use meta-clang being present as an indicator of clang being available.

This does mean we can clean up the logic and just use TOOLCHAIN, as that is always set now.

---
 meta-arm/recipes-security/optee/optee.inc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
meta-arm/recipes-security/optee/optee.inc +2 -4
index a7d64af56a..4dc241543e 100644
@@ -16,15 +16,13 @@ OPTEE_ARCH:arm = "arm32"
 OPTEE_ARCH:aarch64 = "arm64"
 OPTEE_CORE = "${@d.getVar('OPTEE_ARCH').upper()}"
 
-OPTEE_TOOLCHAIN = "${@d.getVar('TOOLCHAIN') or 'gcc'}"
-OPTEE_COMPILER = "${@bb.utils.contains("BBFILE_COLLECTIONS", "clang-layer", "${OPTEE_TOOLCHAIN}", "gcc", d)}"
-
 # Set here but not passed to EXTRA_OEMAKE by default as that breaks
 # the optee-os build
 TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta"
 
+# Assume that our TOOLCHAIN matches OP-TEE's COMPILER
 EXTRA_OEMAKE += "V=1 \
-                 COMPILER=${OPTEE_COMPILER} \
+                 COMPILER=${TOOLCHAIN} \
                  OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}${prefix} \
                  TEEC_EXPORT=${STAGING_DIR_HOST}${prefix} \
                 "
Signature · 1 line
2.43.0
Applied
#2 lore raw
In reply to Ross Burton
Quoted 4 lines · Ross Burton

Upstream appear to have resolved the libgcc linkage issues as these variables are not used in upstream nor our patches.

Applied, thanks!

[1/2] arm/optee: remove redundant libgcc flags

      commit: d85711c0498ed651a3be4a5e31e9a74814a6f288
[2/2] arm/optee: clean up OPTEE_COMPILER assignment
      commit: 1c86990f95174a698962e9423785ca059c2d00e3

Best regards,

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