Bug 281486 - devel/llvm13: fix build with clang 19
Summary: devel/llvm13: 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: Brooks Davis
URL:
Keywords:
Depends on:
Blocks: 280562
  Show dependency treegraph
 
Reported: 2024-09-13 20:00 UTC by Dimitry Andric
Modified: 2024-09-14 07:35 UTC (History)
0 users

See Also:
brooks: maintainer-feedback+


Attachments
devel/llvm13: fix build with clang 19 (3.65 KB, patch)
2024-09-13 20:02 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-09-13 20:00:17 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/devel/llvm13/work/llvm-project-13.0.1.src/flang/include/flang/Evaluate/integer.h:310:32: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    310 |       auto back{FROM::template ConvertSigned(result.value)};
        |                                ^

Upstream has committed a fix to their main branch [2], but it does not
apply cleanly to 13.0.1, so add a backported patch.

[1] https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96
[2] https://github.com/llvm/llvm-project/commit/7bc7672925f8154be3b8220365d3f269ac43621c
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-09-13 20:02:02 UTC
Created attachment 253548 [details]
devel/llvm13: fix build with clang 19
Comment 2 Brooks Davis freebsd_committer freebsd_triage 2024-09-13 21:17:23 UTC
Seems plausible.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-09-14 07:24:32 UTC
A commit in branch main references this bug:

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

commit e34a77083e96050812b4f082efc716dd16069c82
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-09-13 20:00:46 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-09-14 07:21:04 +0000

    devel/llvm13: 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/devel/llvm13/work/llvm-project-13.0.1.src/flang/include/flang/Evaluate/integer.h:310:32: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        310 |       auto back{FROM::template ConvertSigned(result.value)};
            |                                ^

    Upstream has committed a fix to their main branch [2], but it does not
    apply cleanly to 13.0.1, so add a backported patch.

    [1] https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96
    [2] https://github.com/llvm/llvm-project/commit/7bc7672925f8154be3b8220365d3f269ac43621c

    PR:             281486
    Approved by:    brooks (maintainer)
    MFH:            2024Q3

 devel/llvm13/files/patch-backport-7bc7672925 (new) | 61 ++++++++++++++++++++++
 1 file changed, 61 insertions(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-09-14 07:26:36 UTC
A commit in branch 2024Q3 references this bug:

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

commit b3ef9c3fc26694ff56749fcdb04cee2af2567f06
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-09-13 20:00:46 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-09-14 07:25:06 +0000

    devel/llvm13: 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/devel/llvm13/work/llvm-project-13.0.1.src/flang/include/flang/Evaluate/integer.h:310:32: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        310 |       auto back{FROM::template ConvertSigned(result.value)};
            |                                ^

    Upstream has committed a fix to their main branch [2], but it does not
    apply cleanly to 13.0.1, so add a backported patch.

    [1] https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96
    [2] https://github.com/llvm/llvm-project/commit/7bc7672925f8154be3b8220365d3f269ac43621c

    PR:             281486
    Approved by:    brooks (maintainer)
    MFH:            2024Q3

    (cherry picked from commit e34a77083e96050812b4f082efc716dd16069c82)

 devel/llvm13/files/patch-backport-7bc7672925 (new) | 61 ++++++++++++++++++++++
 1 file changed, 61 insertions(+)