installer: fix a runtime error for unittest.

We hit this problem when upgrading glibc.
https://gcc.gnu.org/ml/gcc/2014-11/msg00246.html

The problem is that when linking statically with pthread, the linker
knows pthread_once is undefined weak symbol and refuses
to resolve it.

The workaround in the upstream bug is to pass -lpthread like this
-Wl,--whole-archive -lpthread -Wl,--no-whole-archive.
However, in this package, the -lpthread is passed as the output of a
shell script, so we need to use another way to workaround it.

BUG=chromium:635573
TEST=the unittest passes with new glibc.

Change-Id: I897937b77d6674f0179fd1b2d4cfb64bd44ae18c
Reviewed-on: https://chromium-review.googlesource.com/367455
Commit-Ready: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Reviewed-by: Luis Lozano <llozano@chromium.org>
1 file changed