summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils
diff options
context:
space:
mode:
authorZang Ruochen <xmdy61@gmail.com>2023-05-08 10:12:56 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-05-10 17:18:57 +0100
commit4b77dd0063aa6b794529b650f3f6e3fb9c4d1c3b (patch)
treee7d046f9ef0a421d5126e508c1c6ccd349102b46 /meta/recipes-devtools/elfutils
parent6588655baafff4019d9399fb391a6c6c73b89b6f (diff)
downloadpoky-4b77dd0063aa6b794529b650f3f6e3fb9c4d1c3b.tar.gz
elfutils: upgrade 0.188 -> 0.189
Refresh the following patch. 0015-config-eu.am-do-not-use-Werror.patch Remove the following patches as they have been fixed in the new version. 0001-PR29926-debuginfod-Fix-usage-of-deprecated-CURLINFO_.patch 0002-debuginfod-client-Use-CURLOPT_PROTOCOLS_STR-for-libc.patch changelog: Version 0.189 "Don't deflate!" configure: eu-nm, eu-addr2line and eu-stack can provide demangled symbols when linked with libstdc++. Use --disable-demangler to disable. A new option --enable-sanitize-memory has been added for msan sanitizer support. libelf: elf_compress now supports ELFCOMPRESS_ZSTD when build against libzstd libdwfl: dwfl_module_return_value_location now returns 0 (no return type) for DIEs that point to a DW_TAG_unspecified_type. elfcompress: -t, --type= now support zstd if libelf has been build with ELFCOMPRESS_ZSTD support. backends: Add support for LoongArch and Synopsys ARCv2 processors. (From OE-Core rev: 918cff06ac52f265428e97307fff9d2b381b1302) Signed-off-by: Zang Ruochen <zangruochen@loongson.cn> 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.189.bb (renamed from meta/recipes-devtools/elfutils/elfutils_0.188.bb)5
-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
-rw-r--r--meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch10
-rw-r--r--meta/recipes-devtools/elfutils/files/handle_DW_TAG_unspecified_type.patch88
5 files changed, 6 insertions, 180 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.188.bb b/meta/recipes-devtools/elfutils/elfutils_0.189.bb
index 74271b2411..236f8cef92 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.188.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.189.bb
@@ -21,15 +21,12 @@ 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 \
26 file://handle_DW_TAG_unspecified_type.patch \
27 " 24 "
28SRC_URI:append:libc-musl = " \ 25SRC_URI:append:libc-musl = " \
29 file://0003-musl-utils.patch \ 26 file://0003-musl-utils.patch \
30 file://0015-config-eu.am-do-not-use-Werror.patch \ 27 file://0015-config-eu.am-do-not-use-Werror.patch \
31 " 28 "
32SRC_URI[sha256sum] = "fb8b0e8d0802005b9a309c60c1d8de32dd2951b56f0c3a3cb56d21ce01595dff" 29SRC_URI[sha256sum] = "39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8"
33 30
34inherit autotools gettext ptest pkgconfig 31inherit autotools gettext ptest pkgconfig
35 32
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
deleted file mode 100644
index ee192e3581..0000000000
--- a/meta/recipes-devtools/elfutils/files/0001-PR29926-debuginfod-Fix-usage-of-deprecated-CURLINFO_.patch
+++ /dev/null
@@ -1,49 +0,0 @@
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
deleted file mode 100644
index 2d4c912e82..0000000000
--- a/meta/recipes-devtools/elfutils/files/0002-debuginfod-client-Use-CURLOPT_PROTOCOLS_STR-for-libc.patch
+++ /dev/null
@@ -1,34 +0,0 @@
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
diff --git a/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch b/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
index a7715587db..fd1ec010e5 100644
--- a/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
+++ b/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
@@ -14,20 +14,19 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
14--- 14---
15 config/eu.am | 2 -- 15 config/eu.am | 2 --
16 1 file changed, 2 deletions(-) 16 1 file changed, 2 deletions(-)
17
18diff --git a/config/eu.am b/config/eu.am 17diff --git a/config/eu.am b/config/eu.am
19index 58cd3c4..ac42390 100644 18index e6c241f..4136e7c 100644
20--- a/config/eu.am 19--- a/config/eu.am
21+++ b/config/eu.am 20+++ b/config/eu.am
22@@ -91,7 +91,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ 21@@ -99,7 +99,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
23 -Wold-style-definition -Wstrict-prototypes $(TRAMPOLINES_WARNING) \
24 $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \ 22 $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
25 $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \ 23 $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
24 $(USE_AFTER_FREE3_WARNING) \
26- $(if $($(*F)_no_Werror),,-Werror) \ 25- $(if $($(*F)_no_Werror),,-Werror) \
27 $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ 26 $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
28 $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ 27 $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
29 $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \ 28 $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
30@@ -101,7 +100,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \ 29@@ -109,7 +108,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
31 $(TRAMPOLINES_WARNING) \ 30 $(TRAMPOLINES_WARNING) \
32 $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \ 31 $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
33 $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \ 32 $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
@@ -35,3 +34,4 @@ index 58cd3c4..ac42390 100644
35 $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ 34 $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
36 $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ 35 $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
37 $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \ 36 $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
37--
diff --git a/meta/recipes-devtools/elfutils/files/handle_DW_TAG_unspecified_type.patch b/meta/recipes-devtools/elfutils/files/handle_DW_TAG_unspecified_type.patch
deleted file mode 100644
index 8cab01c29a..0000000000
--- a/meta/recipes-devtools/elfutils/files/handle_DW_TAG_unspecified_type.patch
+++ /dev/null
@@ -1,88 +0,0 @@
1From: Mark Wielaard <mark@klomp.org>
2Date: Thu, 26 Jan 2023 17:19:15 +0000 (+0100)
3Subject: backends: Handle DW_TAG_unspecified_type in dwarf_peeled_die_type
4X-Git-Url: https://sourceware.org/git/?p=elfutils.git;a=commitdiff_plain;h=f2c522567ad63ac293535fba9704895e685ab5bc;hp=3fa98a6f29b0f370e32549ead7eb897c839af980
5
6backends: Handle DW_TAG_unspecified_type in dwarf_peeled_die_type
7
8binutils 2.40 introduces DW_TAG_unspecified_type for assembly
9functions with an unknown return type. This breaks the
10run-funcretval.sh testcase because dwfl_module_return_value_location
11returns an error for such functions because it cannot determine the
12return value location. Fix that by treating DW_TAG_unspecified_type
13as if the DIE doesn't have a DW_AT_type.
14
15Also update the testcase to explicitly checking for
16DW_TAG_unspecified_type and printing "returns unspecified type".
17
18https://sourceware.org/bugzilla/show_bug.cgi?id=30047
19
20Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=f2c522567ad63ac293535fba9704895e685ab5bc;hp=3fa98a6f29b0f370e32549ead7eb897c839af980]
21Signed-off-by: Mark Wielaard <mark@klomp.org>
22---
23
24--- a/backends/libebl_CPU.h
25+++ b/backends/libebl_CPU.h
26@@ -1,5 +1,6 @@
27 /* Common interface for libebl modules.
28 Copyright (C) 2000, 2001, 2002, 2003, 2005, 2013, 2014 Red Hat, Inc.
29+ Copyright (C) 2023 Mark J. Wielaard <mark@klomp.org>
30 This file is part of elfutils.
31
32 This file is free software; you can redistribute it and/or modify
33@@ -53,7 +54,9 @@ extern bool (*generic_debugscn_p) (const
34 dwarf_tag (_die); })
35
36 /* Get a type die corresponding to DIE. Peel CV qualifiers off
37- it. */
38+ it. Returns zero if the DIE doesn't have a type, or the type
39+ is DW_TAG_unspecified_type. Returns -1 on error. Otherwise
40+ returns the result tag DW_AT value. */
41 static inline int
42 dwarf_peeled_die_type (Dwarf_Die *die, Dwarf_Die *result)
43 {
44@@ -69,7 +72,14 @@ dwarf_peeled_die_type (Dwarf_Die *die, D
45 if (dwarf_peel_type (result, result) != 0)
46 return -1;
47
48- return DWARF_TAG_OR_RETURN (result);
49+ if (result == NULL)
50+ return -1;
51+
52+ int tag = dwarf_tag (result);
53+ if (tag == DW_TAG_unspecified_type)
54+ return 0; /* Treat an unspecified type as if there was no type. */
55+
56+ return tag;
57 }
58
59 #endif /* libebl_CPU.h */
60--- a/tests/funcretval.c
61+++ b/tests/funcretval.c
62@@ -1,5 +1,6 @@
63 /* Test program for dwfl_module_return_value_location.
64 Copyright (C) 2005 Red Hat, Inc.
65+ Copyright (C) 2023 Mark J. Wielaard <mark@klomp.org>
66 This file is part of elfutils.
67
68 This file is free software; you can redistribute it and/or modify
69@@ -67,7 +68,18 @@ handle_function (Dwarf_Die *funcdie, voi
70 error (EXIT_FAILURE, 0, "dwfl_module_return_value_location: %s",
71 dwfl_errmsg (-1));
72 else if (nlocops == 0)
73- puts ("returns no value");
74+ {
75+ // Check if this is the special unspecified type
76+ // https://sourceware.org/bugzilla/show_bug.cgi?id=30047
77+ Dwarf_Die die_mem, *typedie = &die_mem;
78+ Dwarf_Attribute attr_mem, *attr;
79+ attr = dwarf_attr_integrate (funcdie, DW_AT_type, &attr_mem);
80+ if (dwarf_formref_die (attr, typedie) != NULL
81+ && dwarf_tag (typedie) == DW_TAG_unspecified_type)
82+ puts ("returns unspecified type");
83+ else
84+ puts ("returns no value");
85+ }
86 else
87 {
88 printf ("return value location:");