Judging on how LLVM and Clang have been integrated into FreeBSD's base, i think you will need to hack Clang's internals to set library and headers paths (lib/Frontend/InitHeaderSearch.cpp
) for your system.
Using libc++ as default definitely needs changing the code (grep lib/Frontend/CompilerInvocation.cpp
for "UseLibcxx"). You will probably need to hack system linker too to change -lstdc++
to -lc++
.
Personally, i'd recommend you just setting CC, CXX, CFLAGS, CXXFLAGS and other vars to achieve same result without much hassle. It works for me flawlessly on FreeBSD.