mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 22:12:10 +01:00
dev-libs/libffi: Sync with Gentoo
It's from Gentoo commit 338780980540b326ee810f1a03e85b9ea446e17e.
This commit is contained in:
parent
a175983e89
commit
e2ccaefe69
38
sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.4.6-c23-tests.patch
vendored
Normal file
38
sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.4.6-c23-tests.patch
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
https://github.com/libffi/libffi/commit/0859f8431242d5adff21420b9cab538d2af527b5
|
||||
|
||||
From 0859f8431242d5adff21420b9cab538d2af527b5 Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Myers <jsm@polyomino.org.uk>
|
||||
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);
|
||||
|
||||
@ -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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user