diff --git a/configure.py b/configure.py index 959c1db6518fdb..4739517f48cdab 100755 --- a/configure.py +++ b/configure.py @@ -1267,7 +1267,9 @@ def configure_static(o): return if options.fully_static: - o['libraries'] += ['-static'] + o['libraries'] += [ + '-static', '-Wl,--whole-archive', '-lpthread', '-Wl,--no-whole-archive' + ] elif options.partly_static: o['libraries'] += ['-static-libgcc', '-static-libstdc++'] if options.enable_asan: