Hi Jakub and Richard,
I modified the patch to use -pthread -lcaf_shmem -lrt on all *-linux* based systems. I have re-tested on the aarch64 with an older glibc and x86_64 with a recent one. Both regtest w/o errors.
I am wondering, if there shouldn't be some configure or tcl magic to compute the dependencies for pthreads and shm_open() calls consistently instead of having to guess them. I mean, libgomp uses pthreads, too. And code duplication is always a bad idea.
Ok for mainline?
- Andre
On Fri, 13 Mar 2026 15:00:10 +0100 Jakub Jelinek jakub@redhat.com wrote:
On Fri, Mar 13, 2026 at 02:51:06PM +0100, Toon Moene wrote:
the linaro CI reported test errors for aarch64 targets. I figured that for aarch64 on linux the compile flags -pthread and -lrt are needed to link caf_shmem and produce an executable. The attached patch addresses this by special case for aarch64-*-linux* similiar to freebsd.
Amazing - I have been testing caf_shmem for weeks now (first as an additional patch and lately just by bootstrapping the master branch) on aarch64-linux and I have never encountered that problem.
Here's the latest test:
https://gcc.gnu.org/pipermail/gcc-testresults/2026-March/871293.html
It is needed only for glibc older than 2.34. And it isn't arch related, just glibc version related.
Jakub