linking with libc++ - problem finding logl

Hi all.

I'm trying to test some piece of code with libc++. I selected libc++ as base library here (FreeBSD) has no support for logl and it's needed for some methematical operations.

I'm building everything with clang 3.2 '-std=c++11 -stdlib=libc++', some files are buundled into static libraries.

When I try to link those libraries into main executable I have this:

/usr/local/libexec/ccache/c++ -O2 -pipe -stdlib=libc++ some.cpp.o another.cpp.o -o build/Result /usr/local/lib/ /usr/local/lib/ /usr/local/lib/ /usr/local/lib/ build/some.a build/another.a -lc++ -lcxxrt -lm /usr/local/lib/ /usr/local/lib/ /usr/local/lib/ /usr/local/lib/ -Wl,-rpath,/usr/local/lib
build/some.a(onemore.cpp.o): In function `Models::old_vega(double, double, double, double, double)':
/home/arcade/work/onemore.cpp:(.text+0x7cb): undefined reference to `logl'
c++: error: linker command failed with exit code 1 (use -v to see invocation)

I'm just curios what happens and what library I need to include?


This would be better addressed to a FreeBSD list, but...

The problem is that FreeBSD's libm currently lacks this function. We have some people working on full C99 compatible math library functions by 10.0. If you don't mind the loss of precision, you can just implement a stub that calls log().