FreeBSD Bugzilla – Attachment 253548 Details for
Bug 281486
devel/llvm13: fix build with clang 19
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
devel/llvm13: fix build with clang 19
devel__llvm13-fix-clang19-build-1.diff (text/plain), 3.65 KB, created by
Dimitry Andric
on 2024-09-13 20:02:02 UTC
(
hide
)
Description:
devel/llvm13: fix build with clang 19
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2024-09-13 20:02:02 UTC
Size:
3.65 KB
patch
obsolete
>commit 0143cbd7065a189f4415c124baa6895d8d104620 >Author: Dimitry Andric <dim@FreeBSD.org> >Date: 2024-09-13T22:00:46+02:00 > > 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 > MFH: 2024Q3 > >diff --git a/devel/llvm13/files/patch-backport-7bc7672925 b/devel/llvm13/files/patch-backport-7bc7672925 >new file mode 100644 >index 000000000000..6778cb80991a >--- /dev/null >+++ b/devel/llvm13/files/patch-backport-7bc7672925 >@@ -0,0 +1,61 @@ >+From 7bc7672925f8154be3b8220365d3f269ac43621c Mon Sep 17 00:00:00 2001 >+From: David Spickett <david.spickett@linaro.org> >+Date: Mon, 3 Jun 2024 15:21:26 +0100 >+Subject: [PATCH] [flang] Fix compilation errors due to new clang template >+ requirements (#94204) >+ >+Since https://github.com/llvm/llvm-project/pull/80801 clang requires a >+template argument list after the use of the template keyword. >+ >+https://lab.llvm.org/buildbot/#/builders/176/builds/10230 >+ >+error: a template argument list is expected after a name prefixed by the >+template keyword [-Wmissing-template-arg-list-after-template-kw] >+ >+This fixes the instances found by the AArch64 Linux builds. >+--- >+ flang/include/flang/Evaluate/integer.h | 2 +- >+ flang/lib/Evaluate/fold-real.cpp | 7 ++++--- >+ flang/runtime/reduction-templates.h | 8 ++++---- >+ 3 files changed, 9 insertions(+), 8 deletions(-) >+ >+--- flang/include/flang/Evaluate/integer.h.orig 2022-06-22 16:46:24 UTC >++++ flang/include/flang/Evaluate/integer.h >+@@ -307,7 +307,7 @@ class Integer { (public) >+ } >+ result.overflow = false; >+ } else if constexpr (bits < FROM::bits) { >+- auto back{FROM::template ConvertSigned(result.value)}; >++ auto back{FROM::template ConvertSigned<Integer>(result.value)}; >+ result.overflow = back.value.CompareUnsigned(that) != Ordering::Equal; >+ } >+ return result; >+--- flang/runtime/reduction-templates.h.orig 2022-06-22 16:46:24 UTC >++++ flang/runtime/reduction-templates.h >+@@ -86,7 +86,7 @@ inline CppTypeFor<CAT, KIND> GetTotalReduction(const D >+ #ifdef _MSC_VER // work around MSVC spurious error >+ accumulator.GetResult(&result); >+ #else >+- accumulator.template GetResult(&result); >++ accumulator.template GetResult<CppType>(&result); >+ #endif >+ return result; >+ } >+@@ -127,7 +127,7 @@ inline void ReduceDimToScalar(const Descriptor &x, int >+ #ifdef _MSC_VER // work around MSVC spurious error >+ accumulator.GetResult(result, zeroBasedDim); >+ #else >+- accumulator.template GetResult(result, zeroBasedDim); >++ accumulator.template GetResult<TYPE>(result, zeroBasedDim); >+ #endif >+ } >+ >+@@ -155,7 +155,7 @@ inline void ReduceDimMaskToScalar(const Descriptor &x, >+ #ifdef _MSC_VER // work around MSVC spurious error >+ accumulator.GetResult(result, zeroBasedDim); >+ #else >+- accumulator.template GetResult(result, zeroBasedDim); >++ accumulator.template GetResult<TYPE>(result, zeroBasedDim); >+ #endif >+ } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 281486
: 253548