nuttx/tools/ci/testlist/arm-09.dat
Xiang Xiao 2c9f91526a board: enable LTO on g431 nsh boards and fix LTO link with toolchain switch
For boards b-g431b-esc1/nsh, nucleo-g431kb/nsh and nucleo-g431rb/nsh,
the `.data` section of nuttx.elf overflows the 128 KB flash region by a
few hundred bytes on default GNU EABI builds:

    arm-none-eabi-ld: nuttx section `.data' will not fit in region `flash'
    arm-none-eabi-ld: region `flash' overflowed by 296 bytes

Enabling CONFIG_LTO_FULL=y in the corresponding defconfigs brings flash
usage back below the 128 KB limit (~93%).

Additionally, fix arch/arm/src/cmake/gcc.cmake so that when LTO is
enabled it always uses the gcc-ar / gcc-nm / gcc-ranlib wrappers, not
just when CONFIG_ARM_TOOLCHAIN_GNU_EABI is also set.  CI tooling (via
tools/testbuild.sh) configures cmake first, then flips the toolchain
choice in .config with kconfig-tweak before running `cmake --build`.
With the previous "ARM_TOOLCHAIN_GNU_EABI && !LTO_NONE" guard the
regen step would switch to plain `ar` for the .a files, even though the
linker driver picked at configure time is still arm-none-eabi-g++ and
the object files contain GCC LTO IR.  The result was a flood of
"undefined reference to `printf' / `free' / `puts' ..." link errors
when running tools/testbuild.sh -A -N -R on the *_CLANG variants.

Now that we are inside gcc.cmake the toolchain is unambiguously GCC,
so dropping the redundant CONFIG_ARM_TOOLCHAIN_GNU_EABI conjunct keeps
the LTO-aware ar wrappers in place across kconfig-tweak toolchain
switches.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-19 16:21:28 +08:00

63 lines
1.3 KiB
Text

/arm/stm32/nucleo-f33*,CONFIG_ARM_TOOLCHAIN_CLANG
/arm/stm32/nucleo-f4*,CONFIG_ARM_TOOLCHAIN_CLANG
/arm/stm32/nucleo-g*,CONFIG_ARM_TOOLCHAIN_GNU_EABI
/arm/stm32/nucleo-l*,CONFIG_ARM_TOOLCHAIN_CLANG
/arm/stm32/olimex-*,CONFIG_ARM_TOOLCHAIN_GNU_EABI
# Boards build by CMake
CMake,nucleo-f334r8:adc
CMake,nucleo-f334r8:highpri
CMake,nucleo-f334r8:nsh
CMake,nucleo-f334r8:spwm1
CMake,nucleo-f334r8:spwm2
CMake,nucleo-f410rb:nsh
CMake,nucleo-f412zg:nsh
CMake,nucleo-f429zi:netnsh
CMake,nucleo-f429zi:nsh
CMake,nucleo-f446re:adc
# CMake,nucleo-f446re:can
CMake,nucleo-f446re:cansock
CMake,nucleo-f446re:dac
CMake,nucleo-f446re:gpio
CMake,nucleo-f446re:ihm08m1_b16
CMake,nucleo-f446re:ihm08m1_f32
# CMake,nucleo-f446re:lcd
CMake,nucleo-f446re:nsh
CMake,nucleo-f446re:pwm
CMake,nucleo-f446re:qenco
CMake,nucleo-f446re:systemview
CMake,nucleo-f401re:fb
CMake,nucleo-f401re:nsh
CMake,nucleo-f411re:mcp2515-extid
CMake,nucleo-f411re:nsh
CMake,nucleo-g431kb:comp
CMake,nucleo-g431kb:nsh
CMake,nucleo-g431kb:pwm
CMake,nucleo-g431rb:adc
# CMake,nucleo-g431rb:can
CMake,nucleo-g431rb:cansock
CMake,nucleo-g431rb:cordic
CMake,nucleo-g431rb:ihm16m1_b16
CMake,nucleo-g431rb:ihm16m1_f32
CMake,nucleo-g431rb:nsh
CMake,nucleo-g431rb:pwm
CMake,nucleo-g431rb:qenco
CMake,nucleo-g474re:nsh
# CMake,nucleo-g474re:usbserial
# CMake,nucleo-l152re:lcd
CMake,nucleo-l152re:nsh