summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-01-18 20:27:24 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-01-24 22:06:51 +0000
commit5a1980490cc4e856e35aa3281ab2600152b9190e (patch)
tree53a6e060a386dc878062bc4464f88294318923b1 /meta/recipes-devtools/elfutils
parent48f90f7ab29fb0b17864ed30c2b88e14820ccefb (diff)
downloadpoky-5a1980490cc4e856e35aa3281ab2600152b9190e.tar.gz
elfutils: Fix build with libcurl >= 7.87
(From OE-Core rev: 3916c5f3cb0f2e0ff349ea266197e31ddceb12d2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.188.bb4
-rw-r--r--meta/recipes-devtools/elfutils/files/0001-PR29926-debuginfod-Fix-usage-of-deprecated-CURLINFO_.patch49
-rw-r--r--meta/recipes-devtools/elfutils/files/0002-debuginfod-client-Use-CURLOPT_PROTOCOLS_STR-for-libc.patch34
3 files changed, 85 insertions, 2 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.188.bb b/meta/recipes-devtools/elfutils/elfutils_0.188.bb
index 084908a38c..65cae868c7 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.188.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.188.bb
@@ -21,6 +21,8 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
21 file://0001-skip-the-test-when-gcc-not-deployed.patch \ 21 file://0001-skip-the-test-when-gcc-not-deployed.patch \
22 file://ptest.patch \ 22 file://ptest.patch \
23 file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \ 23 file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
24 file://0001-PR29926-debuginfod-Fix-usage-of-deprecated-CURLINFO_.patch \
25 file://0002-debuginfod-client-Use-CURLOPT_PROTOCOLS_STR-for-libc.patch \
24 " 26 "
25SRC_URI:append:libc-musl = " \ 27SRC_URI:append:libc-musl = " \
26 file://0003-musl-utils.patch \ 28 file://0003-musl-utils.patch \
@@ -33,8 +35,6 @@ inherit autotools gettext ptest pkgconfig
33EXTRA_OECONF = "--program-prefix=eu-" 35EXTRA_OECONF = "--program-prefix=eu-"
34 36
35BUILD_CFLAGS += "-Wno-error=stringop-overflow" 37BUILD_CFLAGS += "-Wno-error=stringop-overflow"
36# compatibility with curl 7.87; can be removed when elfutils upstream fixes the deprecation fails
37CFLAGS:append = " -Wno-error=deprecated-declarations"
38 38
39DEPENDS_BZIP2 = "bzip2-replacement-native" 39DEPENDS_BZIP2 = "bzip2-replacement-native"
40DEPENDS_BZIP2:class-target = "bzip2" 40DEPENDS_BZIP2:class-target = "bzip2"
diff --git a/meta/recipes-devtools/elfutils/files/0001-PR29926-debuginfod-Fix-usage-of-deprecated-CURLINFO_.patch b/meta/recipes-devtools/elfutils/files/0001-PR29926-debuginfod-Fix-usage-of-deprecated-CURLINFO_.patch
new file mode 100644
index 0000000000..ee192e3581
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0001-PR29926-debuginfod-Fix-usage-of-deprecated-CURLINFO_.patch
@@ -0,0 +1,49 @@
1From d2bf497b12fbd49b4996ccf0744303ffd67735b1 Mon Sep 17 00:00:00 2001
2From: Andrew Paprocki <andrew@ishiboo.com>
3Date: Wed, 21 Dec 2022 11:15:00 -0500
4Subject: [PATCH] PR29926: debuginfod: Fix usage of deprecated CURLINFO_*
5
6The `CURLINFO_SIZE_DOWNLOAD_T` and `CURLINFO_CONTENT_LENGTH_DOWNLOAD_T`
7identifiers are `enum`s, not pre-processor definitions, so the current
8`#ifdef` logic is not selecting the newer API. This results in the
9older identifiers being used and they now generate errors when compiled
10against Curl 7.87, which has silently deprecated them, causing GCC to
11emit `-Werror=deprecated-declarations`.
12
13Instead, the newer identifiers were added in Curl 7.55, so explicitly
14check for `CURL_AT_LEAST_VERSION(7, 55, 0)` instead of the current
15logic. This eliminates the error when compiling against Curl 7.87.
16
17Ref: https://github.com/curl/curl/pull/1511
18
19Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=d2bf497b12fbd49b4996ccf0744303ffd67735b1]
20Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
21---
22 debuginfod/debuginfod-client.c | 4 ++--
23 2 files changed, 6 insertions(+), 2 deletions(-)
24
25diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
26index 8873fcc8..692aecce 100644
27--- a/debuginfod/debuginfod-client.c
28+++ b/debuginfod/debuginfod-client.c
29@@ -1456,7 +1456,7 @@ debuginfod_query_server (debuginfod_client *c,
30 deflate-compressing proxies, this number is likely to be
31 unavailable, so -1 may show. */
32 CURLcode curl_res;
33-#ifdef CURLINFO_CONTENT_LENGTH_DOWNLOAD_T
34+#if CURL_AT_LEAST_VERSION(7, 55, 0)
35 curl_off_t cl;
36 curl_res = curl_easy_getinfo(target_handle,
37 CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
38@@ -1491,7 +1491,7 @@ debuginfod_query_server (debuginfod_client *c,
39 if (target_handle) /* we've committed to a server; report its download progress */
40 {
41 CURLcode curl_res;
42-#ifdef CURLINFO_SIZE_DOWNLOAD_T
43+#if CURL_AT_LEAST_VERSION(7, 55, 0)
44 curl_off_t dl;
45 curl_res = curl_easy_getinfo(target_handle,
46 CURLINFO_SIZE_DOWNLOAD_T,
47--
482.39.1
49
diff --git a/meta/recipes-devtools/elfutils/files/0002-debuginfod-client-Use-CURLOPT_PROTOCOLS_STR-for-libc.patch b/meta/recipes-devtools/elfutils/files/0002-debuginfod-client-Use-CURLOPT_PROTOCOLS_STR-for-libc.patch
new file mode 100644
index 0000000000..2d4c912e82
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0002-debuginfod-client-Use-CURLOPT_PROTOCOLS_STR-for-libc.patch
@@ -0,0 +1,34 @@
1From 6560fb26a62ef135a804357ef4f15a47de3e49b3 Mon Sep 17 00:00:00 2001
2From: Mark Wielaard <mark@klomp.org>
3Date: Tue, 10 Jan 2023 23:20:41 +0100
4Subject: [PATCH] debuginfod-client: Use CURLOPT_PROTOCOLS_STR for libcurl >= 7.85.0
5
6https://sourceware.org/bugzilla/show_bug.cgi?id=29926
7
8Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=6560fb26a62ef135a804357ef4f15a47de3e49b3]
9Signed-off-by: Mark Wielaard <mark@klomp.org>
10---
11 debuginfod/debuginfod-client.c | 5 +++++
12 2 files changed, 10 insertions(+)
13
14diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
15index a16165bd..1ce45632 100644
16--- a/debuginfod/debuginfod-client.c
17+++ b/debuginfod/debuginfod-client.c
18@@ -1336,8 +1336,13 @@ debuginfod_query_server (debuginfod_client *c,
19
20 /* Only allow http:// + https:// + file:// so we aren't being
21 redirected to some unsupported protocol. */
22+#if CURL_AT_LEAST_VERSION(7, 85, 0)
23+ curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS_STR,
24+ "http,https,file");
25+#else
26 curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS,
27 (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE));
28+#endif
29 curl_easy_setopt_ck(data[i].handle, CURLOPT_URL, data[i].url);
30 if (vfd >= 0)
31 curl_easy_setopt_ck(data[i].handle, CURLOPT_ERRORBUFFER,
32--
332.39.1
34