Re: [PATCH] build: Fix ax_pthread.m4 on Solaris 11.4

Eric Gallager <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <CAMfHzOtdGs2eL65d-a_7HPoxG_h6YabwfSS7pH4E09pR3wyAcA@mail.gmail.com>
On Fri, May 15, 2026 at 12:31 PM Rainer Orth
<[email protected]> wrote:
>
> 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 pthreads 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.
>
> Ok for trunk?
>
>         Rainer
>

ax_pthread.m4 is imported from the autoconf-archive, isn't it?
Shouldn't this patch go there first?

> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 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.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.