This is an automated email from the ASF dual-hosted git repository.

yuanz pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git

commit c3adaf8f4e432926bd49478e845174d3f72a893a
Author: Yuan Zhuang <[email protected]>
AuthorDate: Mon Aug 18 08:08:27 2025 +0000

    build: disable CFG_TA_FLOAT_SUPPORT
    
    When building tls_client and tls_server 32bit TAs, this error occurred:
      multiple definition of `__aeabi_fcmple' (`__aeabi_fcmpeq' and others)
    This means the __aeabi functions are defined both in Rustc
    compiler_builtins and optee libutils.
    
    Disable the CFG_TA_FLOAT_SUPPORT when building libutils is a easy
    approach without porting the compiler_builtins.
---
 build_optee_libraries.sh               | 5 ++++-
 scripts/setup/build_optee_libraries.sh | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/build_optee_libraries.sh b/build_optee_libraries.sh
index 36c3c3a..db9ffab 100755
--- a/build_optee_libraries.sh
+++ b/build_optee_libraries.sh
@@ -41,7 +41,10 @@ export CROSS_COMPILE64="aarch64-linux-gnu-"
 
 # build optee_os and optee_client for qemu_v8
 git clone https://github.com/OP-TEE/optee_os.git -b $OPTEE_VERSION 
$OPTEE_DIR/optee_os
-(cd $OPTEE_DIR/optee_os && make PLATFORM=vexpress-qemu_armv8a)
+# set CFG_TA_FLOAT_SUPPORT=n as workaround to fix the building error of 32bit 
tls TAs:
+#   multiple definition of `__aeabi_fcmple' (`__aeabi_fcmpeq' and others)
+# This means the __aeabi functions are defined both in Rustc compiler_builtins 
and optee libutils.
+(cd $OPTEE_DIR/optee_os && make PLATFORM=vexpress-qemu_armv8a 
CFG_TA_FLOAT_SUPPORT=n)
 
 git clone https://github.com/OP-TEE/optee_client.git -b $OPTEE_VERSION 
$OPTEE_DIR/optee_client
 (cd $OPTEE_DIR/optee_client && make WITH_TEEACL=0 DESTDIR=$PWD/export_arm32 
CROSS_COMPILE=$CROSS_COMPILE32)
diff --git a/scripts/setup/build_optee_libraries.sh 
b/scripts/setup/build_optee_libraries.sh
index d7f96a9..d8ca179 100755
--- a/scripts/setup/build_optee_libraries.sh
+++ b/scripts/setup/build_optee_libraries.sh
@@ -32,7 +32,10 @@ export 
CROSS_COMPILE64="${CROSS_COMPILE64:-aarch64-linux-gnu-}"
 
 # build optee_os and optee_client for qemu_v8
 git clone https://github.com/OP-TEE/optee_os.git -b $OPTEE_VERSION 
$OPTEE_DIR/optee_os
-(cd $OPTEE_DIR/optee_os && make PLATFORM=vexpress-qemu_armv8a -j$(nproc))
+# set CFG_TA_FLOAT_SUPPORT=n as workaround to fix the building error of 32bit 
tls TAs:
+#   multiple definition of `__aeabi_fcmple' (`__aeabi_fcmpeq' and others)
+# This means the __aeabi functions are defined both in Rustc compiler_builtins 
and optee libutils.
+(cd $OPTEE_DIR/optee_os && make PLATFORM=vexpress-qemu_armv8a 
CFG_TA_FLOAT_SUPPORT=n -j$(nproc))
 
 git clone https://github.com/OP-TEE/optee_client.git -b $OPTEE_VERSION 
$OPTEE_DIR/optee_client
 (cd $OPTEE_DIR/optee_client && make -j$(nproc) WITH_TEEACL=0 
DESTDIR=$PWD/export_arm32 CROSS_COMPILE=$CROSS_COMPILE32)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to