https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125310
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Rainer Orth <[email protected]>: https://gcc.gnu.org/g:fde12ce90e7e7a1162dde1f4a1a21c9f2f628092 commit r17-2036-gfde12ce90e7e7a1162dde1f4a1a21c9f2f628092 Author: Rainer Orth <[email protected]> Date: Wed Jul 1 09:36:36 2026 +0200 build: Fix ax_pthread.m4 on Solaris 11.4 As uncovered by PR testsuite/125310, libcaf_shmem isn't built on Solaris. This happens because the AX_PTHREAD autoconf macro erroneously thinks that Solaris lacks pthread support. The problem is that the macros expects _REENTRANT to be defined in multithreaded programs. However, as described in https://gcc.gnu.org/gcc-16/porting_to.html#solaris the Solaris 11.4 system headers no longer reference _REENTRANT, so GCC 16 doesn't define it any longer. The issue is still present in current ax_pthread.m4 (serial 31) in the autoconf archive. This patch fixes this by only requiring _REENTRANT in older Solaris versions that still need it by checking for pre-XPG7 system headers. Bootstrapped without regressions on i386-pc-solaris2.11 and sparc-sun-solaris2.11. Also tested manually on Solaris 11.3. 2026-05-14 Rainer Orth <[email protected]> config: * ax_pthread.m4 (ax_pthread_check_macro) <solaris*>: Only require _REENTRANT before Solaris 11.4 libgfortran: * configure: Regenerate. cherry picked from approved upstream pull request AX_PTHREAD: Fix pthread detection on Solaris 11.4 https://github.com/autoconf-archive/autoconf-archive/pull/341
