http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44661
Andrew Pinski pinskia at gcc dot gnu.org changed:
What|Removed |Added
Status|REOPENED|RESOLVED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44661
--- Comment #5 from Georg Sauthoff g_sauthoff at web dot de 2013-03-02
20:42:25 UTC ---
I can reproduce this issue on Ubuntu 10.04 (gcc 4.4.3).
That means:
$ gcc -o foo foo.c -fmudflapth -lpthread -lmudflapth
$ ./foo
- mf:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44661
--- Comment #6 from Andrew Pinski pinskia at gcc dot gnu.org 2013-03-02
20:44:20 UTC ---
I bet the issue is that Ubuntu's GCC passes --as-needed by default (non
standard really).
--- Comment #3 from jakub at gcc dot gnu dot org 2010-07-22 07:53 ---
Of course libmudflapth needs to come first, otherwise it doesn't override
libpthread symbols it means to override.
If it doesn't, that is a user error though.
--
jakub at gcc dot gnu dot org changed:
--- Comment #4 from davi dot arnaut at sun dot com 2010-07-22 10:54 ---
Let's get it documented? One sentence should do. I think it's pertinent because
-lpthread will most of the time come before user supplied compiler flags.
--
davi dot arnaut at sun dot com changed:
--- Comment #2 from pinskia at gcc dot gnu dot org 2010-07-21 23:53 ---
I think libmudflapth does have a dependency on libpthread which is causing this
issue. I think libmudflapth have a weak check in it too.
w pthread_join
--
pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2010-06-28 00:48 ---
-lpthread
I think it is better to use -pthread instead.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44661