Re: Package dependencies in cross gcc
Nikita V. Youshchenko wrote:
running 'arm-linux-g++ -D_REENTRANT -c test.cpp' completes without any
Ah, OK. It seems that I don't need to define -D_REENTRANT on my x86 PC;
g++ test.cc -> #error "...threading support not enabled...
g++ -pthread test.cc -> OK
g++ -D_REENTRANT test.cc -> OK
But with the cross-compiler, I get
armeb-linux-g++ test.cc -> #error "...threading support not enabled...
armeb-linux-g++ -pthread test.cc -> #error "...threading support not
armeb-linux-g++ -D_REENTRANT test.cc -> OK
On the PC, passing -pthread defines _REENTRANT, but it doesn't for the
cross-compiler. Why? What is the recommended platform-independent way
to ask for thread-safe code? I just obeyed Boost's error message, which
says "Please set the correct command line options for threading:
-pthread (Linux)"; should it instead suggest -D_REENTRANT? I suppose
this is getting OT for this list.
Thanks for your help.