GCC 11 (arm-none-eabi) fails to find file which GCC 10 does find

Viewed 111

I have an assembler file CyBootAsmGnu.s which includes another assembler file cyfittergnu.inc:

.syntax unified
.text
.thumb
.include "cyfittergnu.inc"
// more

This file compiles fine with arm GCC 10, exact version:

arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)

But fails with a newer GCC 11:

$ arm-none-eabi-gcc -I/path/to/files -mcpu=cortex-m0 -mthumb -ffunction-sections -ffat-lto-objects -o CyBootAsmGnu.s.obj -c /path/to/files/CyBootAsmGnu.s
/path/to/files/CyBootAsmGnu.s: Assembler messages:
/path/to/files/CyBootAsmGnu.s:18: Error: can't open cyfittergnu.inc for reading: No such file or directory

The file is however exactly where it should be (which is also evident from the fact that GCC 10 can find and read it):

$ stat /path/to/files/cyfittergnu.inc
  File: /path/to/files/cyfittergnu.inc
  Size: 40788           Blocks: 80         IO Block: 512    regular file
Device: 2eh/46d Inode: 17169973579448684  Links: 1
Access: (0777/-rwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-07-18 13:38:43.067197800 +0200
Modify: 2022-03-24 20:11:25.451266500 +0100
Change: 2022-03-24 20:11:25.451266500 +0100
Birth: -                                                                                                                                                                                                                                                                                       

Also note that both files (the including and the included) are in the same directory.

Newer GCC version reports as

arm-none-eabi-gcc (GNU Toolchain for the Arm Architecture 11.2-2022.02 (arm-11.14)) 11.2.1 20220111

Any idea why this is happening? Is something in the include search order changed between those compiler versions? Should I open a bug report?

Operating system is Linux (NixOS) running an a WSL2 on Windows 10, however the same effect has also been seen directly on Windows 10 (on a different machine, and with a checked out copy of the repository on a different filesystem)


Compiling the file from within the directory /path/to/files works with both compiler versions. Also the path to the -I flag is definitively correct, the commandline is generated by CMake and the exact same command line arguments (and working directory and so on) are used with both compilers.

0 Answers
Related