You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/06/03 10:39:13 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on pull request #3836: Make: -nostartfiles -nodefaultlibs are not flags of LD but flags of GCC

Ouss4 commented on pull request #3836:
URL: https://github.com/apache/incubator-nuttx/pull/3836#issuecomment-853771707


   > I believe adding those flags to CFLAGS is not the right option, since CFLAGS (and CXXFLAGS) relate to Compile flags.
   > `-nostarfiles` and `-nodefaultlibs` are Link Options according to GCC documentation: https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
   > 
   > I believe that we should keep them as LDFLAGS and change the Linker command to call the GCC frontend (`LD = $(CROSSDEV)gcc`).
   > This change will also be needed for supporting LTO builds, eventually.
   
   Please take a look at the linked issue.  Those are options for `xx-gcc` not `xx-ld`.  We send `LDFLAGS` to `xx-ld` which is now throwing errors when unrecognized options are supplied.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org