Bug 280728 - www/webkit2-gtk3: fix build with clang 19
Summary: www/webkit2-gtk3: fix build with clang 19
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: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks: 280562
  Show dependency treegraph
 
Reported: 2024-08-10 11:49 UTC by Dimitry Andric
Modified: 2024-08-12 19:48 UTC (History)
1 user (show)

See Also:
fluffy: maintainer-feedback+


Attachments
www/webkit2-gtk3: fix build with clang 19 (6.19 KB, patch)
2024-08-10 11:51 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 2024-08-10 11:49:22 UTC
Clang 19 now implements CWG 96 [1], which requires a template argument
list after a 'template' keyword, resulting in errors similar to:

    /wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.34.6/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h:974:65: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
      974 |         AssemblerType::repatchCompact(dataLabelCompact.template dataLocation(), value);
          |                                                                 ^

In these cases, appending "<>" is enough to satisfy the constraint.
Upstream has committed a fix to their main branch [2], but since some
code has moved around, and other functions have been removed, it does
not apply cleanly to 2.34.6. Therefore, apply only the necessary fixes
manually for now.

[1] https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96
[2] https://github.com/WebKit/WebKit/commit/62b6e2db547e
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-08-10 11:51:19 UTC
Created attachment 252651 [details]
www/webkit2-gtk3: fix build with clang 19
Comment 2 Dima Panov freebsd_committer freebsd_triage 2024-08-11 20:28:30 UTC
Ship it!
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-08-12 19:40:24 UTC
A commit in branch main references this bug:

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

commit 743cdc3096083c022157d3da0291a878f1f8b58b
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-08-10 11:50:00 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-08-12 19:37:36 +0000

    www/webkit2-gtk3: fix build with clang 19

    Clang 19 now implements CWG 96 [1], which requires a template argument
    list after a 'template' keyword, resulting in errors similar to:

        /wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.34.6/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h:974:65: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
          974 |         AssemblerType::repatchCompact(dataLabelCompact.template dataLocation(), value);
              |                                                                 ^

    In these cases, appending "<>" is enough to satisfy the constraint.
    Upstream has committed a fix to their main branch [2], but since some
    code has moved around, and other functions have been removed, it does
    not apply cleanly to 2.34.6. Therefore, apply only the necessary fixes
    manually for now.

    [1] https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96
    [2] https://github.com/WebKit/WebKit/commit/62b6e2db547e

    PR:             280728
    Approved by:    fluffy (maintainer)
    MFH:            2024Q3

 ...ptCore_assembler_AbstractMacroAssembler.h (new) | 11 +++++
 ...h-Source_JavaScriptCore_llint_LLIntData.h (new) | 56 ++++++++++++++++++++++
 ...ch-Source_JavaScriptCore_runtime_JSCast.h (new) | 20 ++++++++
 3 files changed, 87 insertions(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-08-12 19:47:26 UTC
A commit in branch 2024Q3 references this bug:

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

commit 94cfb4eb0e3479f0a905b4261e69845a6ab6534f
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-08-10 11:50:00 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-08-12 19:43:36 +0000

    www/webkit2-gtk3: fix build with clang 19

    Clang 19 now implements CWG 96 [1], which requires a template argument
    list after a 'template' keyword, resulting in errors similar to:

        /wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.34.6/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h:974:65: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
          974 |         AssemblerType::repatchCompact(dataLabelCompact.template dataLocation(), value);
              |                                                                 ^

    In these cases, appending "<>" is enough to satisfy the constraint.
    Upstream has committed a fix to their main branch [2], but since some
    code has moved around, and other functions have been removed, it does
    not apply cleanly to 2.34.6. Therefore, apply only the necessary fixes
    manually for now.

    [1] https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96
    [2] https://github.com/WebKit/WebKit/commit/62b6e2db547e

    PR:             280728
    Approved by:    fluffy (maintainer)
    MFH:            2024Q3

    (cherry picked from commit 743cdc3096083c022157d3da0291a878f1f8b58b)

 ...ptCore_assembler_AbstractMacroAssembler.h (new) | 11 +++++
 ...h-Source_JavaScriptCore_llint_LLIntData.h (new) | 56 ++++++++++++++++++++++
 ...ch-Source_JavaScriptCore_runtime_JSCast.h (new) | 20 ++++++++
 3 files changed, 87 insertions(+)