From b86345a1d2a4485e872ef15a0c4595d1b8a20de3 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sat, 22 Dec 2018 10:09:38 -0700 Subject: [PATCH] Fix linkage of pthreads in gcc --- recipes/gcc/recipe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/gcc/recipe.sh b/recipes/gcc/recipe.sh index c9485d3ef..5aab6e2b3 100644 --- a/recipes/gcc/recipe.sh +++ b/recipes/gcc/recipe.sh @@ -26,7 +26,7 @@ function recipe_build { ln -sf "$sysroot/include" "$sysroot/usr/include" ln -sf "$sysroot/lib" "$sysroot/usr/lib" - export LIBS='-lpthread' + export LIBS='-Wl,--whole-archive -lpthread -Wl,--no-whole-archive' ./configure \ --host=${HOST} \ --target=${HOST} \