diff --git a/mingw-w64-libc++/PKGBUILD b/mingw-w64-libc++/PKGBUILD index b5ab399cb45fd..8df1743b14989 100644 --- a/mingw-w64-libc++/PKGBUILD +++ b/mingw-w64-libc++/PKGBUILD @@ -8,7 +8,7 @@ _realname=libc++ pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-libunwind") -_version=18.1.8 +_version=19.1.0 _rc="" _tag=llvmorg-${_version}${_rc} pkgver=${_version}${_rc/-/} @@ -38,17 +38,17 @@ source=("${_url}/libcxx-${pkgver}.src.tar.xz"{,.sig} "${_url}/runtimes-${pkgver}.src.tar.xz"{,.sig} "${_url}/llvm-${pkgver}.src.tar.xz"{,.sig} "${_url}/cmake-${pkgver}.src.tar.xz"{,.sig}) -sha256sums=('bdecf90be0072bc720fd5c9c8ab061cdb197edd0c8ad3e170dc3e6bfaa49f388' +sha256sums=('99b3020a8b2134a2efc0c26e2ef9b1f07003f65330fa8eb9c2458f14bbf32f39' 'SKIP' - '256c30d724eeb72713bc08ae1692f53aaf4ebe8a1d662c92bf59e69d6c53dce9' + '0108a40b18d586a4706c03d8eeb78714a242e64ed930aeb74a0574e1c6668a6d' 'SKIP' - 'c31577d16978b0da0e472ef751f74893a5b459a7ea4a383b75f7ab93cf1e6877' + 'c5e9205f785511e8487bb1c5a51dbb57bfdf946d48bbc4ef5cfb413ff8fdc259' 'SKIP' - '9997c2e91e5438e2963306ba5019d85b5384b467535632738d8670ced8f07cb3' + 'e5fc29e02198bc1f900c7e42590720cf4b664d4bee75e5d02bc45a4483f2a3b1' 'SKIP' - 'f68cf90f369bc7d0158ba70d860b0cb34dbc163d6ff0ebc6cfa5e515b9b2e28d' + 'a8b141cbfa13f50d84ce545899bd311aaa60d59dfbf7f3a0cf84f25badc1544d' 'SKIP' - '59badef592dd34893cd319d42b323aaa990b452d05c7180ff20f23ab1b41e837' + 'dc78b6a9ac8a097ca6ac0f23c06821d65e6ea3bf666026f529994c1d01056ae7' 'SKIP') validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D' # Hans Wennborg, Google. '474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard @@ -122,6 +122,7 @@ build() { -DLIBUNWIND_ENABLE_FRAME_APIS=ON \ -DLIBUNWIND_ENABLE_SHARED=ON \ -DLIBUNWIND_ENABLE_STATIC=ON \ + -DLLVM_INCLUDE_TESTS=OFF \ "${_extra_config[@]}" \ -DPython3_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe \ -Wno-dev \ diff --git a/mingw-w64-lldb/PKGBUILD b/mingw-w64-lldb/PKGBUILD index 06712fb88ebd5..15df1f56ee8f7 100644 --- a/mingw-w64-lldb/PKGBUILD +++ b/mingw-w64-lldb/PKGBUILD @@ -7,7 +7,7 @@ fi _realname=lldb pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -_version=18.1.8 +_version=19.1.0 _rc="" _tag=llvmorg-${_version}${_rc} pkgver=${_version}${_rc/-/} @@ -41,9 +41,9 @@ _pkgfn=$_realname-$pkgver.src source=($_url/$_pkgfn.tar.xz{,.sig} ${_url}/cmake-${pkgver}.src.tar.xz{,.sig} "104874.patch"::"https://github.com/llvm/llvm-project/pull/104874.patch") -sha256sums=('cac2db253ee3566c01774a888cc0ac3853f1e141c5c9962f04ee562bdb0af426' +sha256sums=('f3269b8261f713542aaba8ada00950ccb24d1fda302c04be962d369190251d6b' 'SKIP' - '59badef592dd34893cd319d42b323aaa990b452d05c7180ff20f23ab1b41e837' + 'dc78b6a9ac8a097ca6ac0f23c06821d65e6ea3bf666026f529994c1d01056ae7' 'SKIP' '87695f7128fe0fb3f0b698a132f6d18cbe513d35ff1e0ebe25afac395ead8e9f') validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D' # Hans Wennborg, Google. diff --git a/mingw-w64-llvm/0002-Fix-Findzstd-on-MINGW.patch b/mingw-w64-llvm/0002-Fix-Findzstd-on-MINGW.patch index 6fc561676c456..79bea3db8ebd1 100644 --- a/mingw-w64-llvm/0002-Fix-Findzstd-on-MINGW.patch +++ b/mingw-w64-llvm/0002-Fix-Findzstd-on-MINGW.patch @@ -1,5 +1,5 @@ ---- a/cmake/modules/Findzstd.cmake -+++ b/cmake/modules/Findzstd.cmake +--- llvm/cmake/modules/Findzstd.cmake.orig 2024-09-17 13:26:36.000000000 +0200 ++++ llvm/cmake/modules/Findzstd.cmake 2024-09-29 13:19:16.980962300 +0200 @@ -16,6 +16,8 @@ set(zstd_STATIC_LIBRARY_SUFFIX "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$") endif() @@ -9,9 +9,9 @@ find_path(zstd_INCLUDE_DIR NAMES zstd.h) find_library(zstd_LIBRARY NAMES zstd zstd_static) find_library(zstd_STATIC_LIBRARY NAMES -@@ -27,16 +29,17 @@ - zstd DEFAULT_MSG - zstd_LIBRARY zstd_INCLUDE_DIR +@@ -27,17 +29,18 @@ + zstd DEFAULT_MSG + zstd_LIBRARY zstd_INCLUDE_DIR ) +endif() @@ -25,8 +25,9 @@ + if(WIN32) # IMPORTED_LOCATION is the path to the DLL and IMPORTED_IMPLIB is the "library". get_filename_component(zstd_DIRNAME "${zstd_LIBRARY}" DIRECTORY) -- string(REGEX REPLACE "${CMAKE_INSTALL_LIBDIR}$" "${CMAKE_INSTALL_BINDIR}" zstd_DIRNAME "${zstd_DIRNAME}") -+ string(REGEX REPLACE "\\${CMAKE_INSTALL_LIBDIR}$" "${CMAKE_INSTALL_BINDIR}" zstd_DIRNAME "${zstd_DIRNAME}") + if(NOT "${CMAKE_INSTALL_LIBDIR}" STREQUAL "" AND NOT "${CMAKE_INSTALL_BINDIR}" STREQUAL "") +- string(REGEX REPLACE "${CMAKE_INSTALL_LIBDIR}$" "${CMAKE_INSTALL_BINDIR}" zstd_DIRNAME "${zstd_DIRNAME}") ++ string(REGEX REPLACE "\\${CMAKE_INSTALL_LIBDIR}$" "${CMAKE_INSTALL_BINDIR}" zstd_DIRNAME "${zstd_DIRNAME}") + endif() get_filename_component(zstd_BASENAME "${zstd_LIBRARY}" NAME) string(REGEX REPLACE "\\${CMAKE_LINK_LIBRARY_SUFFIX}$" "${CMAKE_SHARED_LIBRARY_SUFFIX}" zstd_BASENAME "${zstd_BASENAME}") - set_target_properties(zstd::libzstd_shared PROPERTIES diff --git a/mingw-w64-llvm/0003-add-pthread-as-system-lib-for-mingw.patch b/mingw-w64-llvm/0003-add-pthread-as-system-lib-for-mingw.patch index 8ea90b6b84398..00538474fb1ee 100644 --- a/mingw-w64-llvm/0003-add-pthread-as-system-lib-for-mingw.patch +++ b/mingw-w64-llvm/0003-add-pthread-as-system-lib-for-mingw.patch @@ -14,7 +14,8 @@ index 0a8e3897cce..de9cda5dda3 100644 @@ -41,6 +41,9 @@ set(system_libs) # libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc. # advapi32 required for CryptAcquireContextW in lib/Support/Windows/Path.inc. - set(system_libs ${system_libs} psapi shell32 ole32 uuid advapi32 ws2_32) + # ntdll required for RtlGetLastNtStatus in lib/Support/ErrorHandling.cpp. + set(system_libs ${system_libs} psapi shell32 ole32 uuid advapi32 ws2_32 ntdll) + if( MINGW ) + set(system_libs ${system_libs} pthread) + endif() diff --git a/mingw-w64-llvm/0004-enable-emutls-for-mingw.patch b/mingw-w64-llvm/0004-enable-emutls-for-mingw.patch index 8d89613fa93e7..a0d02c73a000b 100644 --- a/mingw-w64-llvm/0004-enable-emutls-for-mingw.patch +++ b/mingw-w64-llvm/0004-enable-emutls-for-mingw.patch @@ -8,4 +8,4 @@ + isOSCygMing() || isOHOSFamily(); } - /// Tests whether the target uses -data-sections as default. + /// True if the target supports both general-dynamic and TLSDESC, and TLSDESC diff --git a/mingw-w64-llvm/0201-compiler-rt-fix-mingw-compile-error.patch b/mingw-w64-llvm/0201-compiler-rt-fix-mingw-compile-error.patch new file mode 100644 index 0000000000000..ba1faaf71f232 --- /dev/null +++ b/mingw-w64-llvm/0201-compiler-rt-fix-mingw-compile-error.patch @@ -0,0 +1,25 @@ +From 37b214fdd2029a1fb93c02aa57c249db3dd4b106 Mon Sep 17 00:00:00 2001 +From: oltolm +Date: Fri, 4 Oct 2024 12:23:07 +0200 +Subject: [PATCH] compiler-rt: fix mingw compile error + +--- + lib/fuzzer/FuzzerUtilWindows.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/fuzzer/FuzzerUtilWindows.cpp b/lib/fuzzer/FuzzerUtilWindows.cpp +index db80eb3..edf038a 100644 +--- a/lib/fuzzer/FuzzerUtilWindows.cpp ++++ b/lib/fuzzer/FuzzerUtilWindows.cpp +@@ -249,7 +249,7 @@ void SetThreadName(std::thread &thread, const std::string &name) { + if (sz > 0) { + buf.resize(sz); + if (MultiByteToWideChar(CP_UTF8, 0, name.data(), -1, &buf[0], sz) > 0) { +- (void)ThreadNameProc(thread.native_handle(), buf.c_str()); ++ (void)ThreadNameProc(reinterpret_cast(thread.native_handle()), buf.c_str()); + } + } + } +-- +2.46.0.windows.1 + diff --git a/mingw-w64-llvm/PKGBUILD b/mingw-w64-llvm/PKGBUILD index ea2e92599907c..c06c0eac081f5 100644 --- a/mingw-w64-llvm/PKGBUILD +++ b/mingw-w64-llvm/PKGBUILD @@ -28,7 +28,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-llvm" "${MINGW_PACKAGE_PREFIX}-compiler-rt" $( (( _clangprefix )) && echo "${MINGW_PACKAGE_PREFIX}-gcc-compat" ) "${MINGW_PACKAGE_PREFIX}-lld") -_version=18.1.8 +_version=19.1.0 _rc="" _tag=llvmorg-${_version}${_rc} pkgver=${_version}${_rc/-/} @@ -75,30 +75,32 @@ source=("${_url}/llvm-${pkgver}.src.tar.xz"{,.sig} "0101-link-pthread-with-mingw.patch" "0102-Rename-flang-new-flang-experimental-exec-to-flang.patch" # 0201-0299 -> rt + "0201-compiler-rt-fix-mingw-compile-error.patch" # 0301-0399 -> lld "0303-ignore-new-bfd-options.patch" # 0401-0499 -> clang-tools-extra ) -sha256sums=('f68cf90f369bc7d0158ba70d860b0cb34dbc163d6ff0ebc6cfa5e515b9b2e28d' +sha256sums=('a8b141cbfa13f50d84ce545899bd311aaa60d59dfbf7f3a0cf84f25badc1544d' 'SKIP' - '5724fe0a13087d5579104cedd2f8b3bc10a212fb79a0fcdac98f4880e19f4519' + '03c3be44ff8e602213222fb99645c239965623d2bf2a6e4d210249520112377e' 'SKIP' - 'e58877fcd95ed106824bd1a31276dd17ed0c53adcd60ca75289eac0654f0a7f1' + 'eec4beef68f7135011995684d47ac02e0d3781618abb2a6fe18a8dcef6db586f' 'SKIP' - 'e054e99a9c9240720616e927cb52363abbc8b4f1ef0286bad3df79ec8fdf892f' + '808b858e93b0bbae4002e13dcbe8bee850c514a58cbfb63b03d8b465ba95a3de' 'SKIP' - '800e6805fb613eb8428f7a199f6d06c4c19f78f2db69157a129bb04fc1c99769' + '8d125e7513735c57adbdd1bbce59ff2d5844c2bf64a00ff94fe1c04b941ca2b2' 'SKIP' - '59badef592dd34893cd319d42b323aaa990b452d05c7180ff20f23ab1b41e837' + 'dc78b6a9ac8a097ca6ac0f23c06821d65e6ea3bf666026f529994c1d01056ae7' 'SKIP' - 'b76b810f3d3dc5d08e83c4236cb6e395aa9bd5e3ea861e8c319b216d093db074' + 'f521e6cdb6598d777c6120d086aee3993f182ab38bc59ce4a59c48fae4839b8c' 'SKIP' 'eb03df53671df6627768141b3aaa76abe176a14e5e47911c97bec544387c4aff' - '0aff3a85d70ae437dfc634fe40db506bf5701403049284ffbdb931135ae8a483' - '016fbf6f742c062cc59360070264546c10385b1e8c37605758f62dcbea8f9bcc' - '5f86e542dd1ec92b2fe06ee59061c3e23512df7bafabe82206f2b7d80b81836b' + 'ff8bf96fae9531cf6231b502e8c2f38843f826a9dc7e0d98a37cb80fddd36cf4' + '790eb0fccb4ef29c3795bceb8a62c8f4ecd0bdd6c49b2812352b04cfbc552342' + '76d2a88733cebb1f01b766ff2ab91a9e095bae1d2e4cc18c1ffcf21fd095efc4' '715cb8862753854b2d9256e0b70003e2d1f57083d83eaeaf5a095fc72b8a4e26' '2770cadf8ccf6b31aece6aee8f76dceb71e6e9d01fdf3be74c3743480ce34899' + 'b6b56d031bba8ae87bb1ac607025c0dcbf2b88aec9bfeaf1c9786ca5093b7b71' 'fd0253879cc5e31857f57307e6105e56493358e35d7c4540e0b476be607ab94e') validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D' # Hans Wennborg, Google. '474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard @@ -154,6 +156,14 @@ prepare() { apply_patch_with_msg \ "0102-Rename-flang-new-flang-experimental-exec-to-flang.patch" + # Patch compiler-rt + cd "${srcdir}"/compiler-rt + + if (( ! _clangprefix )); then + apply_patch_with_msg \ + "0201-compiler-rt-fix-mingw-compile-error.patch" + fi + # Patch lld cd "${srcdir}"/lld