firmware: -nostartfiles -nodefaultlibs are not flags of LD but flags of GCC
commit818133cd23b493da472daff2cda9a8e97d0c9637
authorHarald Welte <laforge@osmocom.org>
Wed, 22 Nov 2023 13:07:36 +0000 (22 14:07 +0100)
committerHarald Welte <laforge@osmocom.org>
Wed, 22 Nov 2023 13:12:26 +0000 (22 14:12 +0100)
tree95aab419f25c7ef8f8e7d7631ba885728a49dcb0
parent7c60c5d6d95a059a50c85b68a5128c5cfd55f04c
firmware: -nostartfiles -nodefaultlibs are not flags of LD but flags of GCC

It seems that those flags have always been gcc flags, and not ld flags.

After decades of tolerating this, binutils 2.36.x no longer tolerates
those flags but prints an error:

arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles (did you mean --nostartfiles ?)

See also https://github.com/apache/nuttx/issues/3826 and the related
https://github.com/apache/nuttx/pull/3836 how this was solved in another
project - I adopted that solution here 1:1

Change-Id: Id199e4d03d5aae07a347c98f47791f42c12008c6
src/target/firmware/Makefile.inc