https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94138
--- Comment #4 from Laurent Stacul <laurent.stacul at gmail dot com> --- Well the problem of folly is that it requires lots of dependencies. What I can do is to isolate the link command with the needed files. Amongst all the link errors, you will get the described error. As the size is high, I put it there: https://www.transfernow.net/7TixXZ032020 You will have the libfolly.so built with LTO, the CacheLocalitytest.cpp.o and run.sh with the reduced command: /opt/1A/toolchain/x86_64-v20/bin/g++ \ -DNDEBUG \ -O3 -Wl,-flto -ffat-lto-objects -fuse-linker-plugin \ -fno-working-directory -ggdb3 -Wl,--as-needed -rdynamic \ CacheLocalityTest.cpp.o -o cache_locality_test -L. libfolly.so -pthread Tell me if it is helpful or if you need something else. Regards, Stac