Closed
Description
Tested
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.9-git (7e4a0ae4bdd99abbbf299c025aa2ce7b339c8521)
clang version 15.0.0 (https://github.com/llvm/llvm-project b2a7f1c3904ede781565c6ed772f155167aa8325)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/hood/Documents/programming/emsdk/upstream/bin
Example:
test.c:
int f(x){
return x+4;
}
emcc -c test.c -o test.o -fPIC
emcc test.o -o test.so -sSIDE_MODULE=1 -lc
fails with:
wasm-ld: error: unable to find library -lc
emcc: error: '/src/emsdk/emsdk/upstream/bin/wasm-ld -o tst.so --whole-archive tst.o -lc -L/src/emsdk/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic --no-whole-archive -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --import-undefined --import-memory --strip-debug --export-all --no-gc-sections --experimental-pic -shared' failed (returned 1)
Metadata
Metadata
Assignees
Labels
No labels