Using the i386-pc-linux-gnu target does indeed work out of the box! I'll write a little test case. Getting at least the C++11 atomic stuff transparently working would indeed be very cool. I'll write a little test case next.
Am Montag, 16. Dezember 2013 23:12:49 UTC+1 schrieb azakai: > > This might be a limitation of the le32 target, does x86 have it? try with > EMCC_LLVM_TARGET=i386-pc-linux-gnu in the environment. If so though, that's > not good workaround, but at least we'd know what needs fixing. > > Can you make a testcase of this? I can test it on latest upstream le32 as > well. > > - Alon > > > > On Mon, Dec 16, 2013 at 9:00 AM, Floh <[email protected] <javascript:>>wrote: > >> Hi, >> >> I'm currently playing around with C++11 as a side project, and I'm having >> trouble in emscripten with std::atomic (somewhat expected, but I was >> naively hoping that this compiles to some sort of dummy implementation). >> >> I'm having these problems: >> >> std::atomic<int> increment and decrement produces these errors: >> >> ''' >> In file included from >> /Users/floh/emscripten/system/include/libcxx/memory:610: >> /Users/floh/emscripten/system/include/libcxx/atomic:667:17: error: cannot >> compile this atomic library call yet >> {return __c11_atomic_fetch_sub(&this->__a_, __op, __m);} >> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> /Users/floh/emscripten/system/include/libcxx/atomic:661:17: error: cannot >> compile this atomic library call yet >> {return __c11_atomic_fetch_add(&this->__a_, __op, __m);} >> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> ''' >> >> This looks like this is already happening in clang, but going from 3.2 to >> 3.3 didn't help. >> >> The other problem is a simple linker error that __atomic_load can't be >> resolved. >> >> Other than this threading/atomic stuff I didn't encounter other C++11 >> problems in emscripten so far (but I've only scratched the surface yet: >> in-class member-initialisation, move-stuff, make_shared and the new for (x >> : y) loop stuff). >> >> Cheers, >> -Floh. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "emscripten-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
