Discussion:
[PATCH] With gcc, use the '-pthread' compiler flag
Michael Haubenwallner
2011-05-27 13:04:23 UTC
Permalink
Hello!

To use "pthread", the correct usage with gcc (instead of linking '-lpthread') is
via the '-pthread' compiler flag, which is '-pthreads' with older gcc on Solaris.

However, this has to be passed for compilation already, not just for linking.

Attached is a patch that switches to '-pthread' (on Solaris: '-pthreads') compiler
flag with gcc, and does this even for compilation.

Thank you!
/haubi/
--
Michael Haubenwallner
Gentoo on a different level
Karel Gardas
2011-06-02 19:50:37 UTC
Permalink
Thanks! Merged into my tree,

Karel
Post by Michael Haubenwallner
Hello!
To use "pthread", the correct usage with gcc (instead of linking '-lpthread') is
via the '-pthread' compiler flag, which is '-pthreads' with older gcc on Solaris.
However, this has to be passed for compilation already, not just for linking.
Attached is a patch that switches to '-pthread' (on Solaris: '-pthreads') compiler
flag with gcc, and does this even for compilation.
Thank you!
/haubi/
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Mico-devel mailing list
https://lists.sourceforge.net/lists/listinfo/mico-devel
--
Karel Gardas ***@objectsecurity.com
ObjectSecurity Ltd. http://www.objectsecurity.com
Loading...