Wl,--no-as-needed works, while adding a manual "-lpthread" doesn't, because the library doesn't get linked to the program. Reason is probably that weak symbols are not added by the linker
Wl,--no-as-needed works, while adding a manual "-lpthread" doesn't, because the library doesn't get linked to the program. Reason is probably that weak symbols are not added by the linker