Skip to content

Commit 82479c1

Browse files
committed
fix(optee): Document CFLAGS for SDK toolchain
While building OP-TEE with the SDK's Yocto-generated toolchain, the build fails with 'cannot find libgcc.a' linker error. This occurs because the toolchain requires explicit sysroot configuration. OP-TEE's mk/gcc.mk uses CFLAGS64 and CFLAGS32 while querying gcc for library locations ensuring the compiler returns full paths. Add documentation instructing users to export CFLAGS64 and CFLAGS32 with --sysroot flags before building OP-TEE. Signed-off-by: Shiva Tripathi <[email protected]>
1 parent df4f4fb commit 82479c1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

source/linux/Foundational_Components_OPTEE.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ Setting up the toolchain paths
3838
:start-after: .. start_include_yocto_toolchain_host_setup
3939
:end-before: .. end_include_yocto_toolchain_host_setup
4040

41+
Additional Setup for OP-TEE
42+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
43+
44+
OP-TEE requires additional compiler flags to locate libraries correctly:
45+
46+
.. code-block:: console
47+
48+
host# export CFLAGS64="--sysroot=${SYSROOT_64}"
49+
host# export SYSROOT_32="${SDK_INSTALL_DIR}/k3r5-devkit/sysroots/armv7at2hf-vfp-oe-eabi"
50+
host# export CFLAGS32="--sysroot=${SYSROOT_32}"
51+
4152
Building OP-TEE OS
4253
------------------
4354

0 commit comments

Comments
 (0)