nuttx-mirror/.github
simbit18 d16de91e39 [MSYS2] CMake+Ninja Fix arm-none-eabi-ar: Argument list too long
This issue is related to the Arm toolchain for Windows which is available for x86 host architecture only (compatible with x86_64)

Windows (mingw-w64-i686) hosted cross toolchains
AArch32 bare-metal target (arm-none-eabi)

Issue
/bin/sh: line 1: /home/nuttx/nuttxnew/tools/gcc-arm-none-eabi/bin/arm-none-eabi-ar: Argument list too long

On Windows, arm-none-eabi-ar can only accept strings up to a maximum length of 32,768 characters.

We could suppress the 32K include string limitation by setting the CMake variable CMAKE_NINJA_FORCE_RESPONSE_FILE to ON.

This is unfortunately not enough!!! ): In the build phase this error comes out

$ cmake --build build
[2/1025] Building ASM object arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj
FAILED: arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj
/home/nuttx/nuttxnew/tools/gcc-arm-none-eabi/bin/arm-none-eabi-gcc.exe @arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj.rsp -MD -MT arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj -MF arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj.d -o arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj -c /home/nuttx/nxninja/nuttx/arch/arm/src/armv7-m/arm_exception.S
C:/msys64/home/nuttx/nxninja/nuttx/arch/arm/src/armv7-m/arm_exception.S:42:10: fatal error: nuttx/config.h: No such file or directory
   42 | #include <nuttx/config.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.

The Workround I found to solve this problem is to overwrite
the responsible file flag CMAKE_${lang}_RESPONSE_FILE_FLAG with $DEFINES $INCLUDES $FLAGS

Maybe there is a better solution but this one it works. :)
2024-11-21 19:18:38 -03:00
..
actions free disk space action added to fix docker image build issue 2023-12-08 14:42:17 +01:00
ISSUE_TEMPLATE ISSUE_TEMPLATE: fix missing labels 2024-10-21 18:04:27 +02:00
linters .github/linters: Ignore E704 warning 2024-11-17 08:31:08 -03:00
workflows [MSYS2] CMake+Ninja Fix arm-none-eabi-ar: Argument list too long 2024-11-21 19:18:38 -03:00
dependabot.yml chore: Included githubactions in the dependabot config 2022-06-19 11:43:10 +08:00
gcc.json .github/gcc.json: Fix space/tab inconsistency 2022-04-12 13:43:06 +08:00
labeler.yml .github/labeler.yml: add missing drivers label 2024-11-03 20:54:39 +08:00
nxstyle.json Add problem matching for gcc and nxstyle to github actions 2020-06-11 00:52:55 +08:00
PULL_REQUEST_TEMPLATE.md Contributing and PR template fix. 2024-10-12 08:12:05 +08:00
SECURITY.md docs: Include released 10.x and 11.x versions under security policy. 2022-11-21 10:06:31 +01:00