llvm: Upgrade to LLVM-18 RC2
PATCH 1/3 llvm: Upgrade to LLVM-18 RC2
Final Release is coming in first week of March
--- meta/recipes-devtools/llvm/llvm_git.bb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
meta/recipes-devtools/llvm/llvm_git.bb +6 -2
@@ -14,14 +14,17 @@ RDEPENDS:${PN}:append:class-target = " ncurses-terminfo" inherit cmake pkgconfig -PV = "17.0.6" +# could be 'rcX' or 'git' or empty ( for release ) +VER_SUFFIX = "" + +PV = "18.1.0${VER_SUFFIX}" MAJOR_VERSION = "${@oe.utils.trim_version("${PV}", 1)}" LLVM_RELEASE = "${PV}" BRANCH = "release/${MAJOR_VERSION}.x" -SRCREV = "6009708b4367171ccdbf4b5905cb6a803753fe18" +SRCREV = "0d656f0f12d447ac0e197618a0d25495d66388d1" SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH};protocol=https \ file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \ file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \
@@ -75,6 +78,7 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ -DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \ -DLLVM_OPTIMIZED_TABLEGEN=ON \ -DLLVM_TARGETS_TO_BUILD='${LLVM_TARGETS}' \ + -DLLVM_VERSION_SUFFIX='${VER_SUFFIX}' \ -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \ -DCMAKE_BUILD_TYPE=Release \ "
Signature · 1 line
2.43.1
PATCH 2/3 mesa: Fix build with llvm 18
Backport a relevant patch from mesa 24
--- ...-18-remove-useless-passes-partially-.patch | 59 +++++++++++++++++++ meta/recipes-graphics/mesa/mesa.inc | 1 + 2 files changed, 60 insertions(+) create mode 100644 meta/recipes-graphics/mesa/files/0001-fix-ac-llvm-LLVM-18-remove-useless-passes-partially-.patch
meta/recipes-graphics/mesa/files/0001-fix-ac-llvm-LLVM-18-remove-useless-passes-partially-.patch new file +59 -0
@@ -0,0 +1,59 @@ +From bc7e363f8e1a26342e6fd7241c1f0ebb722338d6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Kai=20Wasserb=C3=A4ch?= <[email protected]> +Date: Wed, 22 Nov 2023 20:21:11 +0100 +Subject: [PATCH] fix: ac/llvm: LLVM 18: remove useless passes, partially removed upstream +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream removed llvm::createLoopSinkPass() in commit +<https://github.com/llvm/llvm-project/commit/b9975cec0ea0a2f10d65b7bd1197d9e1706cbd3d> +and there is no useful alternative except moving to the new pass +manager. + +On top of that, the usage of this optimisation pass and +PromoteMemoryToRegisterPass were just useless, according to the +upstream developer of the commit named above. Therefore the easiest +solution is, as him, Marek and Dave suggested, to just remove these two +passes from the pipeline for now. + +Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26336] + +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10192 +Reference: https://github.com/llvm/llvm-project/pull/72811 +Reference: https://github.com/llvm/llvm-project/commit/b9975cec0ea0a2f10d65b7bd1197d9e1706cbd3d +Suggested-by: Dave Airlie <[email protected]> +Suggested-by: Aiden Grossman <[email protected]> +Suggested-by: Marek Olšák <[email protected]> +Signed-off-by: Kai Wasserbäch <[email protected]> +Reviewed-by: Marek Olšák <[email protected]> +Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26336> +--- + src/amd/llvm/ac_llvm_helper.cpp | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/src/amd/llvm/ac_llvm_helper.cpp b/src/amd/llvm/ac_llvm_helper.cpp +index 40a4399e705..5d065279ad1 100644 +--- a/src/amd/llvm/ac_llvm_helper.cpp ++++ b/src/amd/llvm/ac_llvm_helper.cpp +@@ -299,17 +299,12 @@ LLVMPassManagerRef ac_create_passmgr(LLVMTargetLibraryInfoRef target_library_inf + */ + unwrap(passmgr)->add(createBarrierNoopPass()); + +- /* This pass eliminates all loads and stores on alloca'd pointers. */ +- unwrap(passmgr)->add(createPromoteMemoryToRegisterPass()); + #if LLVM_VERSION_MAJOR >= 16 + unwrap(passmgr)->add(createSROAPass(true)); + #else + unwrap(passmgr)->add(createSROAPass()); + #endif + /* TODO: restore IPSCCP */ +- if (LLVM_VERSION_MAJOR >= 16) +- unwrap(passmgr)->add(createLoopSinkPass()); +- /* TODO: restore IPSCCP */ + unwrap(passmgr)->add(createLICMPass()); + unwrap(passmgr)->add(createCFGSimplificationPass()); + /* This is recommended by the instruction combining pass. */ +-- +2.43.0 +
meta/recipes-graphics/mesa/mesa.inc +1 -0
@@ -18,6 +18,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ file://0001-gallium-Fix-build-with-llvm-17.patch \ + file://0001-fix-ac-llvm-LLVM-18-remove-useless-passes-partially-.patch \ " SRC_URI[sha256sum] = "dc7e8c077bc5884df95478263b34bdebb7e88e600689cb56fb07be2b8c304c36"
Signature · 1 line
2.43.1
PATCH 3/3 vulkan-samples: Update to tip of trunk
In reply to Khem RajThis gets the needed fixes for llvm-18 based builds spdlog musl patches has been merged in the updated version module 32bit backport is also available in this version
--- .../0001-Deprecate-u8string_view.patch | 59 ---------- ...ot-use-LFS64-functions-on-linux-musl.patch | 37 ------- .../vulkan/vulkan-samples/32bit.patch | 101 ------------------ .../vulkan/vulkan-samples_git.bb | 5 +- 4 files changed, 1 insertion(+), 201 deletions(-) delete mode 100644 meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch delete mode 100644 meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch delete mode 100644 meta/recipes-graphics/vulkan/vulkan-samples/32bit.patch
meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch deleted +0 -59
@@ -1,59 +0,0 @@ -From 93987b1ce7d6f91387202495aac61026070597df Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Sun, 15 Jan 2023 21:37:52 -0800 -Subject: [PATCH] Deprecate u8string_view - -Use basic_string_view instead - -Upstream-Status: Backport [https://github.com/fmtlib/fmt/commit/dea7fde8b7d649923dd41b0766bdf076033c62a2] -Signed-off-by: Khem Raj <[email protected]> ---- - include/spdlog/fmt/bundled/core.h | 3 ++- - include/spdlog/fmt/bundled/format.h | 15 ++------------- - 2 files changed, 4 insertions(+), 14 deletions(-) - -diff --git a/include/spdlog/fmt/bundled/core.h b/include/spdlog/fmt/bundled/core.h -index 50b79351..e8b029ef 100644 ---- a/include/spdlog/fmt/bundled/core.h -+++ b/include/spdlog/fmt/bundled/core.h -@@ -1484,7 +1484,8 @@ FMT_API void vprint(wstring_view format_str, wformat_args args); - - /** - \rst -- Prints formatted data to ``stdout``. -+ Formats ``args`` according to specifications in ``format_str`` and writes the -+ output to ``stdout``. - - **Example**:: - -diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h -index 1bb24a52..39426361 100644 ---- a/include/spdlog/fmt/bundled/format.h -+++ b/include/spdlog/fmt/bundled/format.h -@@ -407,21 +407,10 @@ void basic_buffer<T>::append(const U *begin, const U *end) { - enum char8_t: unsigned char {}; - #endif - --// A UTF-8 string view. --class u8string_view : public basic_string_view<char8_t> { -- public: -- typedef char8_t char_type; -- -- u8string_view(const char *s): -- basic_string_view<char8_t>(reinterpret_cast<const char8_t*>(s)) {} -- u8string_view(const char *s, size_t count) FMT_NOEXCEPT: -- basic_string_view<char8_t>(reinterpret_cast<const char8_t*>(s), count) {} --}; -- - #if FMT_USE_USER_DEFINED_LITERALS - inline namespace literals { --inline u8string_view operator"" _u(const char *s, std::size_t n) { -- return {s, n}; -+inline basic_string_view<char8_t> operator"" _u(const char* s, std::size_t n) { -+ return {reinterpret_cast<const char8_t*>(s), n}; - } - } - #endif --- -2.39.0 -
meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch deleted +0 -37
@@ -1,37 +0,0 @@ -From ce7a593e74c8e0c2ece15c73e7614d4f13a19a53 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Fri, 30 Dec 2022 13:04:08 -0800 -Subject: [PATCH] Do not use LFS64 functions on linux/musl - -On musl, off_t is 64bit always ( even on 32bit platforms ), therefore using -LFS64 funcitons is not needed on such platforms. Moreover, musl has stopped -providing aliases for these functions [1] which means it wont compile on -newer musl systems. Therefore only use it on 32bit glibc/linux platforms -and exclude musl like cygwin or OSX - -[1] https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4 - -Upstream-Status: Submitted [https://github.com/gabime/spdlog/pull/2589] -Signed-off-by: Khem Raj <[email protected]> ---- - include/spdlog/details/os.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h -index 8e8476f0..be0a67b8 100644 ---- a/include/spdlog/details/os.h -+++ b/include/spdlog/details/os.h -@@ -227,7 +227,9 @@ inline size_t filesize(FILE *f) - #else // unix - int fd = fileno(f); - // 64 bits(but not in osx or cygwin, where fstat64 is deprecated) --#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__) -+#if !defined(__FreeBSD__) && !defined(__APPLE__) && \ -+ (defined(__linux__) && defined(__GLIBC__)) && \ -+ (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__) - struct stat64 st; - if (::fstat64(fd, &st) == 0) - { --- -2.39.0 -
meta/recipes-graphics/vulkan/vulkan-samples/32bit.patch deleted +0 -101
101 lines not on this page · raw message
meta/recipes-graphics/vulkan/vulkan-samples_git.bb +1 -4
@@ -7,13 +7,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=48aa35cefb768436223a6e7f18dc2a2a" SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=main;protocol=https;lfs=0 \ file://0001-vulkan-samples-Fix-reproducibility-issue.patch \ - file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch;patchdir=third_party/spdlog \ - file://0001-Deprecate-u8string_view.patch;patchdir=third_party/spdlog \ - file://32bit.patch \ " UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "2307c3eb5608cb1205fa3514b3a31dbfb857d00c" +SRCREV = "04091a428b76f234d47b8ce72cb4f3693e2fbcd1" UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for" S = "${WORKDIR}/git"
Signature · 1 line
2.43.1
Patchtest results for [PATCH 3/3] vulkan-samples: Update to tip of trunk
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:
---
Testing patch /home/patchtest/share/mboxes/3-3-vulkan-samples-Update-to-tip-of-trunk.patch
FAIL: test src uri left files: Patches not removed from tree. Remove them and amend the submitted mbox (test_metadata.TestMetadata.test_src_uri_left_files)
PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list)
---
Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!
Re: [OE-core] [PATCH 3/3] vulkan-samples: Update to tip of trunk
In reply to Khem RajQuoted 5 lines · Khem Raj
This gets the needed fixes for llvm-18 based builds spdlog musl patches has been merged in the updated version module 32bit backport is also available in this version
Signed-off-by Khem Raj <[email protected]>
Breaks with multilib:
https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/8446/steps/11/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/108/builds/5699/steps/11/logs/stdio
Breaks with musl:
https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/8583/steps/11/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/45/builds/8606
Cheers,
Richard
Re: [OE-core] [PATCH 3/3] vulkan-samples: Update to tip of trunk
lets drop this patch, I think it needs some submodule syncing but I will let upstream do it.
Quoted 21 lines · Richard Purdie
Quoted 5 lines · Khem Raj
This gets the needed fixes for llvm-18 based builds spdlog musl patches has been merged in the updated version module 32bit backport is also available in this version
Signed-off-by Khem Raj <[email protected]>Breaks with multilib:
https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/8446/steps/11/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/108/builds/5699/steps/11/logs/stdioBreaks with musl:
https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/8583/steps/11/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/45/builds/8606Cheers,
Richard