HomeFreeBSD

devel/py-greenlet: fix build with clang 16 on i386

Description

devel/py-greenlet: fix build with clang 16 on i386

Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
Because devel/py-greenlet's build infrastructure does not explicitly set
its C++ standard, this leads to several errors:

In file included from src/greenlet/greenlet.cpp:21:
In file included from src/greenlet/greenlet_slp_switch.hpp:82:
In file included from src/greenlet/slp_platformselect.h:18:
src/greenlet/platform/switch_x86_unix.h:54:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
    register int *stackref, stsizediff;
    ^~~~~~~~~
src/greenlet/platform/switch_x86_unix.h:54:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
    register int *stackref, stsizediff;
    ^~~~~~~~~

The register keyword has already been removed from the similar
switch_amd64_unix.h header, which is why the above problem does not
occur on amd64. To work around the errors, define the register keyword
away using CPPFLAGS.

PR: 271712
Approved by: sunpoet (maintainer)
MFH: 2023Q2

Details

Provenance
dimAuthored on May 29 2023, 6:22 PM
Parents
R11:8433c283d754: lang/gcc14-devel: Switch back to standard bootstrap
Branches
Unknown
Tags
Unknown