You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles #3826
Oh this issue is now on Debian based distros as well?
We've seen this (a general did you mean --option instead of -option) in arch based distros. We couldn't see any references in the GNU project where -option is replaced with --option, so we assumed an issue in the Arch package.
Anyway, did you try to download the toolchain as described in #3209?
The -nostartfiles option is a gcc command line option, not a linker
command line option. It is used when gcc is creating an executable
binary and it tells gcc not to include the standard system files
(eg crt1.o, crtbegin.o, crtend.o etc) when gcc invokes the linker.
All of which means that in your build system somewhere you have:
arm-none-eabi-ld -nostartfiles ...
whereas you probably meant to have:
arm-none-eabi-gcc -nostartfiles ...
Note: the reason why this problem has appeared when you upgraded is
that we recently added some extra error checking to the linker to
attempt to detect mis-spelt command line options. In particular the
linker interprets options that start with a single dash as if they
were multiple, single letter options. So "-nostartfiles" would be
treated as "-n" "-o startfiles" which is probably not what the user
wanted. Hence the error message.
Plus, just to be clear, the linker does not support a --nostartfiles
option. The code that generates the error message does not actually
check to see if the double dash version of the option exists...
Activity
Ouss4 commentedon Jun 2, 2021
Oh this issue is now on Debian based distros as well?
We've seen this (a general did you mean --option instead of -option) in arch based distros. We couldn't see any references in the GNU project where -option is replaced with --option, so we assumed an issue in the Arch package.
Anyway, did you try to download the toolchain as described in #3209?
AlexanderVasiljev commentedon Jun 2, 2021
See my question on binutils
https://sourceware.org/pipermail/binutils/2021-June/116825.html
The answer https://sourceware.org/pipermail/binutils/2021-June/116826.html
from [email protected] is
AlexanderVasiljev commentedon Jun 2, 2021
The flag nostartfiles is not a flag of ld. So it shouldn't appear in LDFLAGS += -nostartfiles
I assume that we should change
LDFLAGS += -nostartfiles -nodefaultlibsto
CXXFLAGS += -nostartfiles -nodefaultlibsin every board Make.defs
It works for my board
AlexanderVasiljev commentedon Jun 3, 2021
#3836
hartmannathan commentedon Jun 10, 2021
This is caused by Binutils being updated to the 2.36.x line.
This is fixed by PR #3836
This is now documented at Release Notes for the (future) NuttX-10.2 release:
https://cwiki.apache.org/confluence/display/NUTTX/NuttX+10.2#ld-now-called-through-gcc
firmware: -nostartfiles -nodefaultlibs are not flags of LD but flags …