I am trying to use emscripten to port some C code that requires libm
. Usually, it uses my system's version, and I don't need to worry about linking to it, but I need to manually link it with emscripten.
How can I link libm
?
I have tried using openlibm
, but when I make
it with emcc
(the emscripten compiler) it cannot find all dependencies, as openlibm
still depends on system headers.
I have also tried using the GNU libc
source, but cannot navigate those Makefile
s.
What I need is the bitcode, as generated by emcc
, to link to when compiling to JavaScript, using the -lm
flag in the compiler.