Right now, using tcc (built from git) on macos 11 (or anything prior to 12.0) will fail with:
ld: warning: object file (/Users/x/d/v/thirdparty/tcc/lib/libgc.a(gc.o)) was built for newer macOS version (12.0) than being linked (10.7)
Undefined symbols for architecture x86_64:
"____chkstk_darwin", referenced from:
_GC_forward_exception in libgc.a(gc.o)
_GC_mark_thread in libgc.a(gc.o)
ld: symbol(s) not found for architecture x86_64
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
This is resolved by rebuilding libgc.a and passing the -mmacosx-version-min=10.7, which matches what v itself is passing to tcc internally.
This specifically affects https://github.com/vlang/tccbin/tree/thirdparty-macos-amd64
I've worked around this locally by manually rebuilding libgc.a with these commands (from the tcc repo):
cc -mmacosx-version-min=10.7 thirdparty/libgc/gc.c -c -o gc.o
libtool -static -o thirdparty/tcc/lib/libgc.a gc.o
(tangential relation to vlang/v#16386)
Right now, using tcc (built from git) on macos 11 (or anything prior to 12.0) will fail with:
This is resolved by rebuilding
libgc.aand passing the-mmacosx-version-min=10.7, which matches what v itself is passing to tcc internally.This specifically affects https://github.com/vlang/tccbin/tree/thirdparty-macos-amd64
I've worked around this locally by manually rebuilding
libgc.awith these commands (from thetccrepo):(tangential relation to vlang/v#16386)