Skip to content

Commit d8d545d

Browse files
committed
fix(optee): add sysroot flags to toolchain setup
Current toolchain setup steps are missing sysroot flags required by OP-TEE and U-Boot build systems, causing "cannot find libgcc.a" linker errors. Add CFLAGS64, KCFLAGS, and LDFLAGS exports with sysroot for 64-bit builds. Add SYSROOT_32 and CFLAGS32 for 32-bit builds. Signed-off-by: Shiva Tripathi <[email protected]>
1 parent df4f4fb commit d8d545d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/linux/Overview/GCC_ToolChain.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,17 @@ Before compiling any of the sources referenced in this document, set the cross c
2323
host# export CROSS_COMPILE_64="${SDK_INSTALL_DIR}/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-"
2424
host# export SYSROOT_64="${SDK_INSTALL_DIR}/linux-devkit/sysroots/aarch64-oe-linux"
2525
host# export CC_64="${CROSS_COMPILE_64}gcc --sysroot=${SYSROOT_64}"
26+
host# export CFLAGS64="--sysroot=${SYSROOT_64}"
27+
host# export KCFLAGS="--sysroot=${SYSROOT_64}"
28+
host# export LDFLAGS="--sysroot=${SYSROOT_64}"
29+
30+
.. ifconfig:: CONFIG_part_variant not in ('AM335X', 'AM437X', 'AM57X', 'AM62LX')
31+
32+
.. code-block:: console
33+
2634
host# export CROSS_COMPILE_32="${SDK_INSTALL_DIR}/k3r5-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-oe-eabi/arm-oe-eabi-"
35+
host# export SYSROOT_32="${SDK_INSTALL_DIR}/k3r5-devkit/sysroots/armv7at2hf-vfp-oe-eabi"
36+
host# export CFLAGS32="--sysroot=${SYSROOT_32}"
2737
2838
If the Processor SDK is not installed, the Arm GNU toolchains can be downloaded and setup. Refer to :ref:`external-arm-toolchain` section for more details on usage.
2939

0 commit comments

Comments
 (0)