PULP Community
Use of -nostdlib in pulp-sdk - Printable Version

+- PULP Community (https://pulp-platform.org/community)
+-- Forum: PULP's Community forum (https://pulp-platform.org/community/forumdisplay.php?fid=1)
+--- Forum: PULP General questions (https://pulp-platform.org/community/forumdisplay.php?fid=2)
+--- Thread: Use of -nostdlib in pulp-sdk (/showthread.php?tid=259)



Use of -nostdlib in pulp-sdk - stefanct - 04-28-2021

Hi,
I am working on various things related to GCC, e.g., LTO, GCC plugins etc. on Pulpissimo. To that end I have modified the contents of pulp-gcc-toolchain and pulp-sdk in the past. One thing that caused some problems was the linker option -nostdlib that's inserted by default by pulp-sdk to the generated makefiles. I always expected it to be absolutely necessary and did not scrutinize it further. However, when I simply tried to remove it everything still seems to remain working when running the binary in the FPGA.

So my question is... What's the rationale to use -nostdlib at all? It is included since the very last commit of pulp-sdk.
NB: The sdk also emits -nostartfiles too (which is implied by -nostdlib).

KR