From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 745AD158013 for ; Sat, 16 Dec 2023 09:31:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 875F12BC015; Sat, 16 Dec 2023 09:31:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 650BB2BC015 for ; Sat, 16 Dec 2023 09:31:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9D04333D3C2 for ; Sat, 16 Dec 2023 09:31:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 196DDACA for ; Sat, 16 Dec 2023 09:31:56 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1702719053.4d6d7f96864b11e288f8d33c59a196f3ec1fb6e6.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/heaptrack/files/, dev-util/heaptrack/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/heaptrack/files/heaptrack-1.5.0-c99.patch dev-util/heaptrack/heaptrack-1.5.0.ebuild dev-util/heaptrack/heaptrack-9999.ebuild X-VCS-Directories: dev-util/heaptrack/files/ dev-util/heaptrack/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 4d6d7f96864b11e288f8d33c59a196f3ec1fb6e6 X-VCS-Branch: master Date: Sat, 16 Dec 2023 09:31:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0cd90c20-5dfe-4c6b-8662-5dc3f7d42a43 X-Archives-Hash: 33631881bab44b5168f4510a424f98aa commit: 4d6d7f96864b11e288f8d33c59a196f3ec1fb6e6 Author: Sam James gentoo org> AuthorDate: Sat Dec 16 09:23:16 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sat Dec 16 09:30:53 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d6d7f96 dev-util/heaptrack: fix modern C issue(s) Closes: https://bugs.gentoo.org/898768 Signed-off-by: Sam James gentoo.org> dev-util/heaptrack/files/heaptrack-1.5.0-c99.patch | 43 ++++++++++++++++++++++ dev-util/heaptrack/heaptrack-1.5.0.ebuild | 9 +++++ dev-util/heaptrack/heaptrack-9999.ebuild | 5 +++ 3 files changed, 57 insertions(+) diff --git a/dev-util/heaptrack/files/heaptrack-1.5.0-c99.patch b/dev-util/heaptrack/files/heaptrack-1.5.0-c99.patch new file mode 100644 index 000000000000..4d88af050d5c --- /dev/null +++ b/dev-util/heaptrack/files/heaptrack-1.5.0-c99.patch @@ -0,0 +1,43 @@ +https://invent.kde.org/sdk/heaptrack/-/merge_requests/24 + +From ce0e0d218e76b1b724f4e10b9da2d8f33e4156b6 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Fri, 15 Dec 2023 22:53:19 +0100 +Subject: [PATCH] cmake: Fix C compatibility of libunwind probes +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Future compilers such as GCC 14 are likely to enforce C type +compatibility rules by default and report errors like this one: + +…/TryCompile-aAxUZn/src.c: In function ‘main’: +…/TryCompile-aAxUZn/src.c:3:43: error: passing argument 1 of ‘unw_backtrace’ from incompatible pointer type + 3 | int main() { void* buf[10]; unw_backtrace(&buf, 10); return 0; } + | ^~~~ + | | + | void * (*)[10] +In file included from /usr/include/libunwind-x86_64.h:129, + from /usr/include/libunwind.h:23, + from …/TryCompile-aAxUZn/src.c:2: +/usr/include/libunwind-common.h:318:27: note: expected ‘void **’ but argument is of type ‘void * (*)[10]’ + 318 | extern int unw_backtrace (void **, int); + | ^~~~~~~ + +Removing the address operator ensures that the array type decays to +a pointer, and that the types are compatible. +--- a/cmake/FindLibunwind.cmake ++++ b/cmake/FindLibunwind.cmake +@@ -57,8 +57,8 @@ if (LIBUNWIND_LIBRARY) + LIBUNWIND_HAS_UNW_GETCONTEXT) + check_c_source_compiles("#define UNW_LOCAL_ONLY 1\n#include \nint main() { unw_context_t context; unw_cursor_t cursor; unw_getcontext(&context); unw_init_local(&cursor, &context); return 0; }" + LIBUNWIND_HAS_UNW_INIT_LOCAL) +- check_c_source_compiles("#define UNW_LOCAL_ONLY 1\n#include \nint main() { void* buf[10]; unw_backtrace(&buf, 10); return 0; }" LIBUNWIND_HAS_UNW_BACKTRACE) +- check_c_source_compiles ("#define UNW_LOCAL_ONLY 1\n#include \nint main() { void* buf[10]; unw_backtrace_skip(&buf, 10, 2); return 0; }" LIBUNWIND_HAS_UNW_BACKTRACE_SKIP) ++ check_c_source_compiles("#define UNW_LOCAL_ONLY 1\n#include \nint main() { void* buf[10]; unw_backtrace(buf, 10); return 0; }" LIBUNWIND_HAS_UNW_BACKTRACE) ++ check_c_source_compiles ("#define UNW_LOCAL_ONLY 1\n#include \nint main() { void* buf[10]; unw_backtrace_skip(buf, 10, 2); return 0; }" LIBUNWIND_HAS_UNW_BACKTRACE_SKIP) + check_c_source_compiles ("#define UNW_LOCAL_ONLY 1\n#include \nint main() { return unw_set_cache_size(unw_local_addr_space, 1024, 0); }" LIBUNWIND_HAS_UNW_SET_CACHE_SIZE) + check_c_source_compiles ("#define UNW_LOCAL_ONLY 1\n#include \nint main() { return unw_set_caching_policy(unw_local_addr_space, UNW_CACHE_PER_THREAD); }" LIBUNWIND_HAS_UNW_CACHE_PER_THREAD) + set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE}) +-- +GitLab diff --git a/dev-util/heaptrack/heaptrack-1.5.0.ebuild b/dev-util/heaptrack/heaptrack-1.5.0.ebuild index fd796741d336..eb794b0466ad 100644 --- a/dev-util/heaptrack/heaptrack-1.5.0.ebuild +++ b/dev-util/heaptrack/heaptrack-1.5.0.ebuild @@ -42,6 +42,15 @@ RDEPEND="${DEPEND} " BDEPEND="gui? ( kde-frameworks/extra-cmake-modules:0 )" +QA_CONFIG_IMPL_DECL_SKIP=( + # This doesn't exist in libunwind (bug #898768). + unw_backtrace_skip +) + +PATCHES=( + "${FILESDIR}"/${PN}-1.5.0-c99.patch +) + src_prepare() { cmake_src_prepare rm -rf 3rdparty/boost-zstd || die # ensure no bundling diff --git a/dev-util/heaptrack/heaptrack-9999.ebuild b/dev-util/heaptrack/heaptrack-9999.ebuild index e449505549c7..78ccbe37b70d 100644 --- a/dev-util/heaptrack/heaptrack-9999.ebuild +++ b/dev-util/heaptrack/heaptrack-9999.ebuild @@ -41,6 +41,11 @@ RDEPEND="${DEPEND} " BDEPEND="gui? ( kde-frameworks/extra-cmake-modules:0 )" +QA_CONFIG_IMPL_DECL_SKIP=( + # This doesn't exist in libunwind (bug #898768). + unw_backtrace_skip +) + src_prepare() { cmake_src_prepare rm -rf 3rdparty/boost-zstd || die # ensure no bundling