From 58ebc0680ef8b5ddffc75c4c8f2cbc8881fecfab Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 30 May 2022 15:17:01 +0300 Subject: [PATCH] builtin: fix sporadic linking failures on `v -cc gcc -gc boehm examples/hello_world.v` --- vlib/builtin/builtin_d_gcboehm.c.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/builtin/builtin_d_gcboehm.c.v b/vlib/builtin/builtin_d_gcboehm.c.v index 69dac05359..cab113019f 100644 --- a/vlib/builtin/builtin_d_gcboehm.c.v +++ b/vlib/builtin/builtin_d_gcboehm.c.v @@ -32,7 +32,6 @@ $if dynamic_boehm ? { $if macos || linux { #flag -DGC_PTHREADS=1 #flag -I@VEXEROOT/thirdparty/libgc/include - #flag -lpthread $if (prod && !tinyc && !debug) || !(amd64 || arm64 || i386 || arm32) { // TODO: replace the architecture check with a `!$exists("@VEXEROOT/thirdparty/tcc/lib/libgc.a")` comptime call #flag @VEXEROOT/thirdparty/libgc/gc.o @@ -40,6 +39,7 @@ $if dynamic_boehm ? { #flag @VEXEROOT/thirdparty/tcc/lib/libgc.a } #flag -ldl + #flag -lpthread } $else $if freebsd { // Tested on FreeBSD 13.0-RELEASE-p3, with clang, gcc and tcc: #flag -DBUS_PAGE_FAULT=T_PAGEFLT