I tried to implement this all as a CMake config as a cmake skill-builder & to explore the described benefits of transitioning to clang/llvm.
But I encountered a problem that it seems like no one else has mentioned: I was getting a lot of undefined symbols until I included explicit linking against crt0.o
, crti.o
, crtbegin.o
, and crtend.o
.
So, I must have an option or flag wrong or missing, given how roundabout my solution is. Doing the build “manually” at the command line needed the same objects added in.
Is this an expected pitfall?
Here’s my minimum working example: https://github.com/apullin/clang_min_fw
with the additions in ${CRT_SUPPORT_ROOT}
and ${CRT_SUPPORT_LINK}
.
Any insight into what I am missing?