embeddedartistry / embeddedartistry/libc

Linker Flag Investigation: -nolibc vs -nostdlib/-nodefaultlibs

Open
#125 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
661
Forks
78
PR merge metrics
No merged PRs in 30d

Description

Shoudl our libc use this flag? instead of nostdlib or nodefaultlibs?

```
-nolibc
Do not use the C library or system libraries tightly coupled with it when linking. Still link with the startup files, libgcc or toolchain provided language support libraries such as libgnat, libgfortran or libstdc++ unless options preventing their inclusion are used as well. This typically removes -lc from the link command line, as well as system libraries that normally go with it and become meaningless when absence of a C library is assumed, for example -lpthread or -lm in some configurations. This is intended for bare-board targets when there is indeed no C library available.
```

This might eliminate the need to handle #124

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.