Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Aug 2024 22:04:13 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 4c6d856c838f - main - devel/llvm16: fix build with libc++ 19
Message-ID:  <202408022204.472M4DWO030774@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim:

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

commit 4c6d856c838f3e5edffd0d3ed01983d924907799
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-08-02 19:37:01 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-08-02 22:00:31 +0000

    devel/llvm16: fix build with libc++ 19
    
    As noted in the libc++ 19 release notes [1], std::char_traits<> is now
    only provided for char, char8_t, char16_t, char32_t and wchar_t, and any
    instantiation for other types will fail.
    
    This causes devel/llvm16 to fail to compile with clang 19 and libc++
    19, resulting in errors similar to:
    
        /usr/include/c++/v1/string:820:42: error: implicit instantiation of undefined template 'std::char_traits<unsigned char>'
          820 |   static_assert(is_same<_CharT, typename traits_type::char_type>::value,
              |                                          ^
        /wrkdirs/usr/ports/devel/llvm16/work-default/llvm-project-16.0.6.src/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:636:34: note: in instantiation of template class 'std::basic_string<unsigned char>' requested here
          636 |       std::basic_string<uint8_t> zeros(reg_info.byte_size, '\0');
              |                                  ^
        /usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared here
           23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
              |                             ^
    
    Upstream llvm has fixed this in commit 68744ffbdd7d [2], so add this as
    a PATCHFILES entry in the Makefile.
    
    [1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals
    [2] https://github.com/llvm/llvm-project/commit/68744ffbdd7d
    
    PR:             280579
    Approved by:    brooks (maintainer)
    MFH:            2024Q3
---
 devel/llvm16/Makefile | 1 +
 devel/llvm16/distinfo | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/devel/llvm16/Makefile b/devel/llvm16/Makefile
index fa655ef715e1..d04686f98467 100644
--- a/devel/llvm16/Makefile
+++ b/devel/llvm16/Makefile
@@ -9,6 +9,7 @@ DISTNAME=	llvm-project-${DISTVERSION}.src
 DISTFILES=	llvm-project-${DISTVERSION}.src${EXTRACT_SUFX}
 
 PATCH_SITES=	https://github.com/llvm/llvm-project/commit/
+PATCHFILES+=	llvmorg-18-init-1760-g68744ffbdd7d.patch:-p1 # https://reviews.llvm.org/D157589
 PATCHFILES+=	llvmorg-18-init-15199-gb9935bb02a50.patch:-p1 # https://github.com/llvm/llvm-project/pull/75748
 PATCHFILES+=	llvmorg-18-init-15680-g966d564e43e6.patch:-p1 # https://github.com/llvm/llvm-project/pull/76185
 
diff --git a/devel/llvm16/distinfo b/devel/llvm16/distinfo
index e7394a506f14..9cf157883e23 100644
--- a/devel/llvm16/distinfo
+++ b/devel/llvm16/distinfo
@@ -1,6 +1,8 @@
-TIMESTAMP = 1686758340
+TIMESTAMP = 1722603709
 SHA256 (llvm-project-16.0.6.src.tar.xz) = ce5e71081d17ce9e86d7cbcfa28c4b04b9300f8fb7e78422b1feb6bc52c3028e
 SIZE (llvm-project-16.0.6.src.tar.xz) = 118013488
+SHA256 (llvmorg-18-init-1760-g68744ffbdd7d.patch) = ad9ad1613491f69b010dbbd6a9d90d5dd505e46d9537a6e533f36dacd552d0f7
+SIZE (llvmorg-18-init-1760-g68744ffbdd7d.patch) = 1491
 SHA256 (llvmorg-18-init-15199-gb9935bb02a50.patch) = b0805cba765084c7bef426fa1235dd887c61ae0c1fd5e3fad5c8742cdd6ee8b0
 SIZE (llvmorg-18-init-15199-gb9935bb02a50.patch) = 1893
 SHA256 (llvmorg-18-init-15680-g966d564e43e6.patch) = 3abf92d4a788ff2f74fa9fc627a113f04d9fb72cd7e47344a8c4dce06140a163



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408022204.472M4DWO030774>