Bug 271712 - devel/py-greenlet: fix build with clang 16 on i386
Summary: devel/py-greenlet: fix build with clang 16 on i386
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks: 271047
  Show dependency treegraph
 
Reported: 2023-05-29 18:26 UTC by Dimitry Andric
Modified: 2023-06-05 17:21 UTC (History)
0 users

See Also:
sunpoet: maintainer-feedback+


Attachments
devel/py-greenlet: fix build with clang 16 on i386 (1.63 KB, patch)
2023-05-29 18:27 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2023-05-29 18:26:41 UTC
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.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-05-29 18:27:06 UTC
Created attachment 242483 [details]
devel/py-greenlet: fix build with clang 16 on i386
Comment 2 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-06-05 14:19:28 UTC
LGTM. Thanks.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-06-05 17:20:48 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e13b0edc8bb2f696676715abd54d65b9c0403b66

commit e13b0edc8bb2f696676715abd54d65b9c0403b66
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-05-29 18:22:34 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-06-05 17:19:29 +0000

    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

 devel/py-greenlet/Makefile | 3 +++
 1 file changed, 3 insertions(+)