Brijesh-Thakkar commented on issue #18393:
URL: https://github.com/apache/nuttx/issues/18393#issuecomment-6241411494
correction to my previous comment, i dug further and the libgcc-10-dev
theory was wrong.
i reproduced the exact error (both "cannot find -lgcc_s" lines,
Makefile:460, Unix.mk:552) in a clean ubuntu:20.04 container with gcc 10.5.0,
using the tree from the issue date (nuttx 37226646fc). the toolchain was
healthy, libgcc-10-dev was installed.
root cause: arch/sim's Make.defs linked with `-Wl,-no-pie`. that flag only
reaches ld, so the gcc driver still sets up a PIE link (Scrt1.o, crtbeginS.o),
and ld ends up searching for libgcc_s.a, which ubuntu doesn't ship. `gcc
-Wl,-no-pie hello.c` fails the same way, while `gcc -no-pie hello.c` works.
the make build was already fixed on master by fd907e6ef4 ("sim: pass no-pie
through gcc driver"). current master builds fine in the same container.
@PlutusCN @wangtao13 could you pull latest master and confirm?
the cmake build (arch/sim/src/cmake/Toolchain.cmake) still uses
`-Wl,-no-pie`, so i'm checking whether it hits the same error and will send a
fix if it does.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]