nuttx/arch/arm/src/cmake
Marco Casaroli ebabdd57f3 arch/arm: Keep GCC from making tail calls in an FDPIC module.
With -mfdpic and -mlong-calls, GCC turns a call to an imported function
in tail position into "ldr r3, [r9, #off]; bx r3".  The GOT slot holds
the address of the function descriptor, so the branch goes to the
descriptor in RAM instead of through it, and the core faults.  A normal
call loads the code address and the data base from the descriptor
first.  GCC 13.2 and 15.3 both do this.

Only an optimized build makes tail calls.  The C++ library of
apps/testing/fs/xipfs then faults in its constructor, which ends in a
call to syslog(), and the test stops at "stage the C++ module".

Pass -fno-optimize-sibling-calls with the other FDPIC flags, in the make
build and the CMake build.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-10-07 11:45:09 -03:00
..
arm.cmake
armclang.cmake Kconfig: Add configurable Stack Canaries protection levels. 2025-09-11 19:56:42 +08:00
armv6-m.cmake
armv7-a.cmake
armv7-m.cmake
armv7-m_armclang.cmake
armv7-m_clang.cmake
armv7-m_gcc.cmake
armv7-m_ghs.cmake ghs: change the vfpv3 to vfpv5 2026-01-14 09:41:49 +08:00
armv7-r.cmake
armv8-m.cmake arch/arm/ra8m1: Add Renesas RA8M1 chip support 2026-09-29 06:46:52 -03:00
armv8-r.cmake arch/armv8-r: use -mfpu=fpv5-sp-d16 for SP-only Cortex-R52 targets 2025-12-08 21:09:05 +08:00
clang.cmake toolchain/arm/clang:Update clang compilation specifications 2026-02-04 02:33:36 +08:00
elf.cmake arch/arm: Keep GCC from making tail calls in an FDPIC module. 2026-10-07 11:45:09 -03:00
gcc.cmake Kconfig: Add configurable Stack Canaries protection levels. 2025-09-11 19:56:42 +08:00
ghs.cmake cmake: Use NUTTX(_DIR/_BIN_DIR) instead CMAKE(_SRC_DIR/_BIN_DIR) 2026-08-09 11:13:08 -03:00
platform.cmake arch/arm/ra8m1: Add Renesas RA8M1 chip support 2026-09-29 06:46:52 -03:00
Toolchain.cmake