Skip to content

Failed attempt to rename spec link_gcc_c_sequence to nosys_link_gcc_c_sequence #1540

Description

@khoi-nguyen-2359

Hello all.

I run into this error when compiling the source code. In short, the nosys_link_gcc_c_sequence somehow already existed when executing nosys.specs.

Error logs:

➜  crazyflie-firmware git:(develop) ✗ make cf2_defconfig
...
➜  crazyflie-firmware git:(develop) ✗ make -j$(sysctl -n hw.ncpu)
  GEN     ./Makefile
scripts/kconfig/conf  --silentoldconfig Kconfig
  Using .. as source for kernel
  GEN     ./Makefile
  LD      app_api/built-in.o
  CC      src/init/main.o
 ...
  LD      src/init/built-in.o
arm-none-eabi-gcc: fatal error: /Applications/ArmGNUToolchain/14.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/lib/nosys.specs: attempt to rename spec 'link_gcc_c_sequence' to already defined spec 'nosys_link_gcc_c_sequence'
compilation terminated.
make[3]: *** [src/init/built-in.o] Error 1
make[2]: *** [src/init] Error 2
make[2]: *** Waiting for unfinished jobs....
  CC      src/drivers/esp32/src/esp_rom_bootloader.o
...

Environment: MacOS / Apple Silicon
ARM toolchain: 14.3.rel1 (Same issues with 12.2 and 13.3)

Workaround: Removing two-- specs in LDFLAGS (issues with nano.specs too) can get the compile to succeed.

-LDFLAGS += --specs=nosys.specs --specs=nano.specs $(PROCESSOR) -nostdlib
+LDFLAGS += $(PROCESSOR) -nostdlib

My question is, when is the nosys_link_gcc_c_sequence created the first time? LDFLAGS in Makefile seems to be the only place showing that the specs are specified. However, I notice that nosys and nano specs are also used in vendor/CMSIS/CMSIS/DSP/Toolchain/GCC.cmake.

Thank you!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions