On Mon, 18 May 2026 at 09:04, Rainer Orth <[email protected]> wrote:
>
> g++ has predefined _XOPEN_SOURCE=600 since
>
>         [fixincludes, v3] Enable full ISO C99 support for C++ on Solaris 10+
>         http://gcc.gnu.org/ml/gcc-patches/2010-05/msg01308.html
>
> While Solaris 10 introduced XPG6/POSIX.1-2001 support, the default
> compilation environment remained XPG3 until Solaris 11.3.  However,
> libstdc++ uses many XPG6 interfaces, so g++ need to explicitly enable
> that.
>
> Only Solaris 11.4 implemented XPG7/POSIX.1-2008 support, at the same
> time changing the default to XPG7.
>
> Therefore, g++ can remove the explicit enablement of XPG6, using the
> 11.4 default just like gcc has done all the time.
>
> __EXTENSIONS__ needs to remain, however: a considerable part of
> libstdc++ depends on that.
>
> Bootstrapped on i386-pc-solaris2.11, amd64-pc-solaris2.11,
> sparc-sun-solaris2.11, and sparcv9-sun-solaris2.11.  There were no
> changed to any config.h file.
>
> I'll commit this to trunk in a few days unless Jonathan finds fault with
> the change and the Rust patch below has been committed:
>
> The patch caused little problems, fortunately:
>
>         libsanitizer: Fix sanitizer_platform_limits_solaris.cpp compilation
>         https://gcc.gnu.org/pipermail/gcc-patches/2026-May/716950.html
>
> A one-line change already upstream.
>
>         rust: Avoid generic PRIVATE etc. identifiers to fix Solaris build
>         https://gcc.gnu.org/pipermail/gcc-patches/2026-May/716934.html
>
> The use of PRIVATE as an identifier would have caused the same problem
> in C code already.
>
> I'll mention this in the GCC 17 changes.html once we get there.

This makes sense to me.

Somewhat related, I will try to get the
--enable-clocale=ieee_1003.1-2008 patch (PR 57585) ready for GCC 17.



>
>         Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 2026-05-15  Rainer Orth  <[email protected]>
>
>         gcc:
>         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Don't define
>         _XOPEN_SOURCE=600 for C++.
>

Reply via email to