summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2024-06-19 12:38:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-06-24 12:43:41 +0100
commit28def3edbaad2fab478185ee6cf3399b26a3be4b (patch)
treed3b416649da049be393f078d18956d9b2e21cb09
parentcebbe9a63843081e7f904cdefb6ce6f48da8f401 (diff)
downloadpoky-28def3edbaad2fab478185ee6cf3399b26a3be4b.tar.gz
libxcrypt: correct the check for a working libucontext.h
The test fails with GCC 14.1 due to an incompatible pointer assignment, take a patch submitted upstream to fix this. (From OE-Core rev: 054304ecb3a8a8ed523bd149f70ed468cf613178) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/libxcrypt/files/configure-c99.patch39
-rw-r--r--meta/recipes-core/libxcrypt/libxcrypt.inc3
2 files changed, 41 insertions, 1 deletions
diff --git a/meta/recipes-core/libxcrypt/files/configure-c99.patch b/meta/recipes-core/libxcrypt/files/configure-c99.patch
new file mode 100644
index 0000000000..b77ea7af07
--- /dev/null
+++ b/meta/recipes-core/libxcrypt/files/configure-c99.patch
@@ -0,0 +1,39 @@
1From cfe9f4d6b0a5d10a15e10e987d528c5c513a42f1 Mon Sep 17 00:00:00 2001
2From: Florian Weimer <fweimer@redhat.com>
3Date: Tue, 19 Dec 2023 11:00:11 +0100
4Subject: [PATCH] configure: Only text the makecontext signature we need
5
6The test/explicit-bzero.c test uses a start routine without any
7arguments. There is no need for the multi-argument version.
8
9This avoids a build failure with glibc and future compilers.
10The GNU C library declares the makecontext callback of
11type void (*) (void), so no cast is needed. On other systems,
12the type may be the (currently distinct) type void (*) (),
13but given that this only affects the ability to execute a test,
14no further machinery is added here to detect that different type.
15
16Upstream-Status: Submitted [https://github.com/besser82/libxcrypt/pull/178/]
17Signed-off-by: Ross Burton <ross.burton@arm.com>
18---
19 configure.ac | 2 --
20 1 file changed, 2 deletions(-)
21
22diff --git a/configure.ac b/configure.ac
23index 016997c..4b8afd8 100644
24--- a/configure.ac
25+++ b/configure.ac
26@@ -303,13 +303,11 @@ AS_IF([test $ac_cv_header_ucontext_h = yes],
27 #include <ucontext.h>
28 static int x;
29 static void fn1(void) {}
30-static void fn2(int a, int b) { x = a - b; }
31 ]], [[
32 ucontext_t uc1, uc2;
33 if (getcontext(&uc1)) return 1;
34 if (setcontext(&uc1)) return 1;
35 makecontext(&uc1, fn1, 0);
36- makecontext(&uc2, fn2, 2, 1, 1);
37 if (swapcontext(&uc1, &uc2)) return 1;
38 return x;
39 ]])],
diff --git a/meta/recipes-core/libxcrypt/libxcrypt.inc b/meta/recipes-core/libxcrypt/libxcrypt.inc
index ba93d91aef..ee6875aa05 100644
--- a/meta/recipes-core/libxcrypt/libxcrypt.inc
+++ b/meta/recipes-core/libxcrypt/libxcrypt.inc
@@ -13,7 +13,8 @@ SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH};protocol=
13SRCREV = "f531a36aa916a22ef2ce7d270ba381e264250cbf" 13SRCREV = "f531a36aa916a22ef2ce7d270ba381e264250cbf"
14SRCBRANCH ?= "master" 14SRCBRANCH ?= "master"
15 15
16SRC_URI += "file://fix_cflags_handling.patch" 16SRC_URI += "file://fix_cflags_handling.patch \
17 file://configure-c99.patch"
17 18
18PROVIDES = "virtual/crypt" 19PROVIDES = "virtual/crypt"
19 20