I am unable to link the application using arm-none-eabi-gcc.exe supplied with Arm GNU Toolchain 11.2-2022.02 prebuilt Windows package (available at https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads).
In case the application contains lot of object files (with total length of all object filenames > 32767 characters), the response file is used for arm-none-eabi-gcc.exe invocation - to avoid Windows CreateProcess limitation.
Internally, arm-none-eabi-gcc.exe runs collect2.exe, also using response file. However, collect2.exe then runs ld.exe with all object filepaths passed as-is, this leads to fatal error:
collect2.exe: fatal error: CreateProcess: No such file or directory compilation terminated.
A simple project to reproduce the issue is available at https://github.com/vmedcy/gcc-linker-bug
The build error is reproducible on multiple Windows 10 machines, also on GitHub Actions CI at https://github.com/vmedcy/gcc-linker-bug/actions/runs/2095187131
The root cause of collect2.exe not using the response file for final ld.exe invocation is likely related to HAVE_GNU_LD evaluating as "false" in "fork_execute "ld" invocations: https://gcc.gnu.org/git/?p=gcc.git;f=gcc/collect2.c;hb=refs/tags/releases/gcc-11.2.0
Probably, "--with-gnu-ld" configure options was missed in the toolchain build manifest.
This is a functional regression, compared to (now deprecated) GNU Arm Embedded Toolchain version 10.3-2021.10 for Cortex R/M, probably caused by a switch to Linaro ABE build framework.
I downloaded gcc-arm-none-eabi-10.3-2021.10-src.tar.bz2 from https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads, and found the build-toolchain.sh explicitly passes "--with-gnu-as --with-gnu-ld" to GCC configure script.
I was not able to inspect the ABE build manifest for gcc-arm-11.2-2022.02, due to https://community.arm.com/support-forums/f/compilers-and-libraries-forum/52292/compile-arm-none-eabi-11-from-source/176355#176355 and https://bugs.linaro.org/show_bug.cgi?id=5836
I guess https://community.arm.com/support-forums/f/compilers-and-libraries-forum/52288/arm-none-eabi-gcc-11-version-compiler-asmbler-failed and https://bugs.linaro.org/show_bug.cgi?id=5835 have a similar root cause (missing --with-gnu-as configure switch).
Kindly confirm there is an issue with the Linaro ABE build manifest, and check if it possible to provide an updated package. We have customers who may rely on GCC 11 for Cortex-M55 related updates.
Seems similar to this where another flag, HAVE_GNU_AS, was missing. The last post on that topic provides info on the place to report such issues
Thanks, that makes sense, reported in Linaro Bugzilla as bugs.linaro.org/show_bug.cgi