From fdc60817d389f50c9139cbf55a1f05df98ceaf53 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 25 Feb 2021 12:35:00 +0200 Subject: [PATCH] sync: fix compilation on latest linux distros (having only gcc-10) with tcc --- vlib/sync/atomic2/atomic.v | 9 ++++++++- vlib/sync/channels.v | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/vlib/sync/atomic2/atomic.v b/vlib/sync/atomic2/atomic.v index e2758342d9..21e9a2a466 100644 --- a/vlib/sync/atomic2/atomic.v +++ b/vlib/sync/atomic2/atomic.v @@ -19,7 +19,14 @@ further tested. $if linux { $if tinyc { // most Linux distributions have /usr/lib/libatomic.so, but Ubuntu uses gcc version specific dir - #flag -L/usr/lib/gcc/x86_64-linux-gnu/6 -L/usr/lib/gcc/x86_64-linux-gnu/7 -L/usr/lib/gcc/x86_64-linux-gnu/8 -L/usr/lib/gcc/x86_64-linux-gnu/9 -latomic + #flag -L/usr/lib/gcc/x86_64-linux-gnu/6 + #flag -L/usr/lib/gcc/x86_64-linux-gnu/7 + #flag -L/usr/lib/gcc/x86_64-linux-gnu/8 + #flag -L/usr/lib/gcc/x86_64-linux-gnu/9 + #flag -L/usr/lib/gcc/x86_64-linux-gnu/10 + #flag -L/usr/lib/gcc/x86_64-linux-gnu/11 + #flag -L/usr/lib/gcc/x86_64-linux-gnu/12 + #flag -latomic } } #include diff --git a/vlib/sync/channels.v b/vlib/sync/channels.v index 017a75a74e..954de2f346 100644 --- a/vlib/sync/channels.v +++ b/vlib/sync/channels.v @@ -12,7 +12,14 @@ import rand $if linux { $if tinyc { // most Linux distributions have /usr/lib/libatomic.so, but Ubuntu uses gcc version specific dir - #flag -L/usr/lib/gcc/x86_64-linux-gnu/6 -L/usr/lib/gcc/x86_64-linux-gnu/7 -L/usr/lib/gcc/x86_64-linux-gnu/8 -L/usr/lib/gcc/x86_64-linux-gnu/9 -latomic + #flag -L/usr/lib/gcc/x86_64-linux-gnu/6 + #flag -L/usr/lib/gcc/x86_64-linux-gnu/7 + #flag -L/usr/lib/gcc/x86_64-linux-gnu/8 + #flag -L/usr/lib/gcc/x86_64-linux-gnu/9 + #flag -L/usr/lib/gcc/x86_64-linux-gnu/10 + #flag -L/usr/lib/gcc/x86_64-linux-gnu/11 + #flag -L/usr/lib/gcc/x86_64-linux-gnu/12 + #flag -latomic } }