This should match what we have in meta-linaro/dora, which is the linaro 2013.12 toolchain release.
---------- Forwarded message ---------- From: Koen Kooi <k...@dominion.thruhere.net> Date: 17 January 2014 19:35 Subject: Fwd: seemingly bug in Linaro gcc 4.8 To: Koen Kooi <koen.k...@linaro.org> Begin doorgestuurd bericht: > Van: Khem Raj <raj.k...@gmail.com> > Onderwerp: seemingly bug in Linaro gcc 4.8 > Datum: 17 januari 2014 17:56:23 CET > Aan: Koen Kooi <k...@dominion.thruhere.net> > > Hey Koen > > I am seeing a problem with linaro gcc-48 basically angstrom/2013.12 release > The issue is attached sample C file. When compiled and run on my ArchLinux > box which is running upstream gcc 4.8.2 it works ok > > but on beagleboard it fails. > > > to compile > > $CXX -pthread -std=gnu++11 a.cpp > > on ARCH > > kraj@leo ~ > g++ b.cpp -std=gnu++11 -pthread > kraj@leo ~ > ./a.out > 140309495478016 i: 1 > 140309503870720 i: 2 > > on Beagleboard > > root@beagleboard:~# ./std-thread > pure virtual method called > terminate called without an active exception > Aborted > > Can you pass this to right folks in Linaro and get some help in resolving it > > I havent yet trried it with OE-Core gcc which is also gcc 4.8 > > The issue is most probably ARM related as it seems to me. > > Thanks for help > > -Khem >
#include <iostream> #include <thread> #include <mutex> std::mutex mx; int i; void thrfunc(); int main(void) { i=0; std::thread thr1(thrfunc),thr2(thrfunc); thr1.join(); thr2.join(); return 0; } void thrfunc() { mx.lock(); i++; std::cout << std::this_thread::get_id() << " i: " << i << std::endl; mx.unlock(); }
_______________________________________________ linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain