I just download the arm-none-eabi-gcc 11 version from:
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads
But I can not compile my project that succeed before with arm-none-eabi-gcc 10.
it fail with the assembler file, that I embeded a binary file with 'incbin' instruction,
seem it can not find the include path, if the binary is not same path with asmbler file.
Here is a simple demo code incbin_test.S:
.section .rodata .global thing .balign 4 thing: .incbin "demo.bin" thing_end: .global thing_size .balign 4 thing_size: .int thing_end - thing
there is a demo.bin in the path inc/
Then compile with gcc
arm-none-eabi-gcc -Iinc -c incbin_test.S -o incbin_test.o
It issue the error:
incbin_test.S: Assembler messages:incbin_test.S:6: Error: file not found: demo.bin
But that work with the arm-none-eabi-gcc(gcc version 10.2.1 20201103 (release) (GNU Arm Embedded Toolchain 10-2020-q4-major))
Br,
Yingchun
The 10.3-2021.10 arm-none-eabi-gcc was configured with --with-gnu-as switch, as can be seen by running arm-none-eabi-gcc -v.
The 11.2-2022.02 arm-none-eabi-gcc was not configured with --with-gnu-as. Because of this difference, asm_options in the default spec (gcc -dumpspecs) is missing the switches (specifically, %{I*}) that make the compiler pass its include directory arguments to the assembler.
static const char *asm_options = "%{-target-help:%:print-asm-header()} " #if HAVE_GNU_AS /* If GNU AS is used, then convert -w (no warnings), -I, and -v to the assembler equivalents. */ "%{v} %{w:-W} %{I*} " #endif
I think that gcc passes the include directory argument to the assembler only if gcc was configured with the knowledge of a default assembler.
There might be a way to workaround this by using specs files, but -Wa,-Iinc seems to be the easiest, safest solution.
Get it, thanks for your professional explain.
I faced the same issue but I can not use your workaround as I use arm-none-eabi-gcc from cmake. What do you think, is there any good reason to provide gcc built without "--with-gnu-as" from now ? Should we provide a report to Linaro Bug Tracking System ?
I dont think this is a bug from Linaro, the source code should be ok, just who delivered
this compiler binary made some change.
Hi,
The Linaro Bugzilla is the right place to report this issue and similar issues. This is mentioned in:
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain under the section on:
"Report a Bug about the Arm GNU Toolchain releases", which provides a link to report this type of issues:
bugs.linaro.org/enter_bug.cgi
For those interested: bugs.linaro.org/show_bug.cgi