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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AF563158042 for ; Sun, 17 Nov 2024 05:28:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D7141E0A8B; Sun, 17 Nov 2024 05:28:44 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BD4B0E0A8B for ; Sun, 17 Nov 2024 05:28:44 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D7EF234131D for ; Sun, 17 Nov 2024 05:28:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 796ED17EC for ; Sun, 17 Nov 2024 05:28:42 +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: <1731821292.338780980540b326ee810f1a03e85b9ea446e17e.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libffi/files/, dev-libs/libffi/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/libffi/files/libffi-3.4.6-c23-tests.patch dev-libs/libffi/libffi-3.4.6-r2.ebuild X-VCS-Directories: dev-libs/libffi/files/ dev-libs/libffi/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 338780980540b326ee810f1a03e85b9ea446e17e X-VCS-Branch: master Date: Sun, 17 Nov 2024 05:28:42 +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: 6e7fade2-cd19-4bd3-85bd-9d4d9218deb8 X-Archives-Hash: e540d86273b88a9ff0f1962391207e9b commit: 338780980540b326ee810f1a03e85b9ea446e17e Author: Sam James gentoo org> AuthorDate: Sun Nov 17 05:27:59 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sun Nov 17 05:28:12 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33878098 dev-libs/libffi: fix tests w/ C23 Signed-off-by: Sam James gentoo.org> dev-libs/libffi/files/libffi-3.4.6-c23-tests.patch | 38 ++++++++++++++++++++++ dev-libs/libffi/libffi-3.4.6-r2.ebuild | 1 + 2 files changed, 39 insertions(+) diff --git a/dev-libs/libffi/files/libffi-3.4.6-c23-tests.patch b/dev-libs/libffi/files/libffi-3.4.6-c23-tests.patch new file mode 100644 index 000000000000..dc53b120cd90 --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.4.6-c23-tests.patch @@ -0,0 +1,38 @@ +https://github.com/libffi/libffi/commit/0859f8431242d5adff21420b9cab538d2af527b5 + +From 0859f8431242d5adff21420b9cab538d2af527b5 Mon Sep 17 00:00:00 2001 +From: Joseph Myers +Date: Thu, 24 Oct 2024 18:26:58 +0000 +Subject: [PATCH] Fix testsuite for C23 `va_start` (#861) + +In the C23 revision of the C standard, `va_start` ignores its second +argument, which is no longer required (previously the last named +function parameter - which the compiler knows anyway, so it's +redundant information). + +This has the consequence for the libffi testsuite, when making GCC +default to `-std=gnu23`, of making two tests fail with warnings about +an unused function argument (only passed to `va_start` and not +otherwise used). Fix those test failures by explicitly casting the +argument to `void`. +--- a/testsuite/libffi.call/va_struct2.c ++++ b/testsuite/libffi.call/va_struct2.c +@@ -33,6 +33,7 @@ test_fn (int n, ...) + struct small_tag s2; + struct large_tag l; + ++ (void) n; + va_start (ap, n); + s1 = va_arg (ap, struct small_tag); + l = va_arg (ap, struct large_tag); +--- a/testsuite/libffi.call/va_struct3.c ++++ b/testsuite/libffi.call/va_struct3.c +@@ -33,6 +33,7 @@ test_fn (int n, ...) + struct small_tag s2; + struct large_tag l; + ++ (void) n; + va_start (ap, n); + s1 = va_arg (ap, struct small_tag); + l = va_arg (ap, struct large_tag); + diff --git a/dev-libs/libffi/libffi-3.4.6-r2.ebuild b/dev-libs/libffi/libffi-3.4.6-r2.ebuild index 2235dc0d702f..61fa9d5ad843 100644 --- a/dev-libs/libffi/libffi-3.4.6-r2.ebuild +++ b/dev-libs/libffi/libffi-3.4.6-r2.ebuild @@ -44,6 +44,7 @@ PATCHES=( "${FILESDIR}"/${P}-asan.patch "${FILESDIR}"/${P}-tests.patch "${FILESDIR}"/${P}-regenerate-autotools.patch + "${FILESDIR}"/${P}-c23-tests.patch ) src_prepare() {