Popped up in https://bugs.gentoo.org/729256 where honggfuzz uses blocks to implement destructors in C on clang. https://stackoverflow.com/questions/5907071/clang-block-in-linux provides a cmall example that should work: $ cat c.c #include <stdio.h> int main() { void (^hello)(void) = ^(void) { printf("Hello, block!\n"); }; hello(); return 0; } $ LANG=C clang -fblocks c.c -lBlocksRuntime /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lBlocksRuntime /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible libgcc_s.so.1 when searching for libgcc_s.so.1 clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
Is it supposed to be provided? A quick grep over CMakeLists.txt doesn't reveal any rules to build these files.
Other distributions package it from somewhere else. I can do the same.
If 'somewhere else' is a LLVM project, I still think it's better to be maintained by LLVM team.
It is 6 years old fork of compiler-rt: https://github.com/mackyle/blocksruntime
If you have some free time (yeah!), maybe try to submit CMakeLists.txt for building it from compiler-rt ;-).