[PATCH] D56836: [mips] Include whole lpthread when using both -pthread and -static

2019-01-24 Thread Aleksandar Beserminji via Phabricator via cfe-commits
abeserminji abandoned this revision. abeserminji added a comment. Agreed on this solution D52878 . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56836/new/ https://reviews.llvm.org/D56836 ___

[PATCH] D56836: [mips] Include whole lpthread when using both -pthread and -static

2019-01-18 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan added a comment. In D56836#1362967 , @abeserminji wrote: > As an option, we can provide necessary flags for the test to finish > successfully instead of not testing it. Agreed. Repository: rC Clang CHANGES SINCE LAST ACTION https://revi

[PATCH] D56836: [mips] Include whole lpthread when using both -pthread and -static

2019-01-18 Thread Aleksandar Beserminji via Phabricator via cfe-commits
abeserminji added a comment. @atanasyan That looks good. I tried to make an equivalent for the Makefile --- SingleSource/UnitTests/C++11/Makefile (revision 351547) +++ SingleSource/UnitTests/C++11/Makefile (working copy) @@ -4,6 +4,11 @@ CPPFLAGS += -std=c++11 -pthread

[PATCH] D56836: [mips] Include whole lpthread when using both -pthread and -static

2019-01-17 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan added a comment. In D56836#1361528 , @abeserminji wrote: > I am not sure if -static option passed as --cflag to lnt runtest enters the > LDFLAGS. I guess it doesn't. > But if there is a way to check which options are passed as --cflags, we >

[PATCH] D56836: [mips] Include whole lpthread when using both -pthread and -static

2019-01-17 Thread Aleksandar Beserminji via Phabricator via cfe-commits
abeserminji added a comment. I am not sure if -static option passed as --cflag to lnt runtest enters the LDFLAGS. I guess it doesn't. But if there is a way to check which options are passed as --cflags, we might be able to add -Wl, -whole-archive -lpthread -Wl -no-whole-archive only in case wh

[PATCH] D56836: [mips] Include whole lpthread when using both -pthread and -static

2019-01-17 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan added a comment. Now I'm not sure that we really need to make this code more complicated. As to the `stdthreadbug` test case, maybe we can just exclude this test if LDFLAGS contains the `-static` option. As to this patch, is it possible to implement the following algorithm? Will it b

[PATCH] D56836: [mips] Include whole lpthread when using both -pthread and -static

2019-01-17 Thread Aleksandar Beserminji via Phabricator via cfe-commits
abeserminji created this revision. abeserminji added reviewers: petarj, atanasyan, MatzeB, mstojanovic. Herald added subscribers: jfb, arichardson, sdardis, srhines. When executing test-suite tests with -static option, we get stdthreadbug test to fail. Sometimes it segfault, sometimes it gets stu