From 4b77dd0063aa6b794529b650f3f6e3fb9c4d1c3b Mon Sep 17 00:00:00 2001 From: Zang Ruochen Date: Mon, 8 May 2023 10:12:56 +0800 Subject: 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 Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/recipes-devtools/elfutils/elfutils_0.188.bb | 174 --------------------- meta/recipes-devtools/elfutils/elfutils_0.189.bb | 171 ++++++++++++++++++++ ...uginfod-Fix-usage-of-deprecated-CURLINFO_.patch | 49 ------ ...client-Use-CURLOPT_PROTOCOLS_STR-for-libc.patch | 34 ---- .../0015-config-eu.am-do-not-use-Werror.patch | 10 +- .../files/handle_DW_TAG_unspecified_type.patch | 88 ----------- 6 files changed, 176 insertions(+), 350 deletions(-) delete mode 100644 meta/recipes-devtools/elfutils/elfutils_0.188.bb create mode 100644 meta/recipes-devtools/elfutils/elfutils_0.189.bb delete mode 100644 meta/recipes-devtools/elfutils/files/0001-PR29926-debuginfod-Fix-usage-of-deprecated-CURLINFO_.patch delete mode 100644 meta/recipes-devtools/elfutils/files/0002-debuginfod-client-Use-CURLOPT_PROTOCOLS_STR-for-libc.patch delete mode 100644 meta/recipes-devtools/elfutils/files/handle_DW_TAG_unspecified_type.patch diff --git a/meta/recipes-devtools/elfutils/elfutils_0.188.bb b/meta/recipes-devtools/elfutils/elfutils_0.188.bb deleted file mode 100644 index 74271b2411..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils_0.188.bb +++ /dev/null @@ -1,174 +0,0 @@ -SUMMARY = "Utilities and libraries for handling compiled object files" -HOMEPAGE = "https://sourceware.org/elfutils" -DESCRIPTION = "elfutils is a collection of utilities and libraries to read, create and modify ELF binary files, find and handle DWARF debug data, symbols, thread state and stacktraces for processes and core files on GNU/Linux." -SECTION = "base" -LICENSE = "GPL-2.0-only & GPL-2.0-or-later & LGPL-3.0-or-later & GPL-3.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://debuginfod/debuginfod-client.c;endline=28;md5=f0a7c3170776866ee94e8f9225a6ad79 \ - " -DEPENDS = "zlib virtual/libintl" -DEPENDS:append:libc-musl = " argp-standalone fts musl-obstack " -# The Debian patches below are from: -# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz -SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \ - file://run-ptest \ - file://0001-dso-link-change.patch \ - file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \ - file://0003-fixheadercheck.patch \ - file://0006-Fix-build-on-aarch64-musl.patch \ - file://0001-libasm-may-link-with-libbz2-if-found.patch \ - file://0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch \ - file://0001-skip-the-test-when-gcc-not-deployed.patch \ - file://ptest.patch \ - file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \ - file://0001-PR29926-debuginfod-Fix-usage-of-deprecated-CURLINFO_.patch \ - file://0002-debuginfod-client-Use-CURLOPT_PROTOCOLS_STR-for-libc.patch \ - file://handle_DW_TAG_unspecified_type.patch \ - " -SRC_URI:append:libc-musl = " \ - file://0003-musl-utils.patch \ - file://0015-config-eu.am-do-not-use-Werror.patch \ - " -SRC_URI[sha256sum] = "fb8b0e8d0802005b9a309c60c1d8de32dd2951b56f0c3a3cb56d21ce01595dff" - -inherit autotools gettext ptest pkgconfig - -EXTRA_OECONF = "--program-prefix=eu-" - -BUILD_CFLAGS += "-Wno-error=stringop-overflow" - -DEPENDS_BZIP2 = "bzip2-replacement-native" -DEPENDS_BZIP2:class-target = "bzip2" - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'debuginfod', 'debuginfod libdebuginfod', '', d)}" -PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}" -PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz" -PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" -PACKAGECONFIG[libdebuginfod] = "--enable-libdebuginfod,--disable-libdebuginfod,curl" -PACKAGECONFIG[debuginfod] = "--enable-debuginfod,--disable-debuginfod,libarchive sqlite3 libmicrohttpd" - -RDEPENDS:${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils iproute2-ss bsdtar gcc-symlinks binutils-symlinks libgcc-dev" - -EXTRA_OECONF:append:class-target = " --disable-tests-rpath" - -# symver functions not currently supported on microblaze -EXTRA_OECONF:append:class-target:microblaze = " --disable-symbol-versioning" - -RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils glibc-dbg glibc-dev" -INSANE_SKIP:${PN}-ptest = "debug-deps dev-deps" - -do_compile_ptest() { - cd ${B}/tests - oe_runmake buildtest-TESTS oecheck -} -PTEST_PARALLEL_MAKE = "" - -do_install_ptest() { - if [ ${PTEST_ENABLED} = "1" ]; then - # copy the files which needed by the cases - TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint elfcompress elfclassify stack unstrip" - install -d -m 755 ${D}${PTEST_PATH}/src - install -d -m 755 ${D}${PTEST_PATH}/lib - install -d -m 755 ${D}${PTEST_PATH}/libelf - install -d -m 755 ${D}${PTEST_PATH}/libdw - install -d -m 755 ${D}${PTEST_PATH}/libdwfl - install -d -m 755 ${D}${PTEST_PATH}/libdwelf - install -d -m 755 ${D}${PTEST_PATH}/libasm - install -d -m 755 ${D}${PTEST_PATH}/libcpu - install -d -m 755 ${D}${PTEST_PATH}/libebl - for test_file in ${TEST_FILES}; do - if [ -f ${B}/src/${test_file} ]; then - cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src - fi - done - cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so - cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so - cp ${D}${libdir}/libasm-${PV}.so ${D}${PTEST_PATH}/libasm/libasm.so - cp ${B}/libcpu/libcpu.a ${D}${PTEST_PATH}/libcpu/ - cp ${B}/libebl/libebl.a ${D}${PTEST_PATH}/libebl/ - cp ${B}/lib/libeu.a ${D}${PTEST_PATH}/lib/ - cp ${S}/libelf/*.h ${D}${PTEST_PATH}/libelf/ - cp ${S}/libdw/*.h ${D}${PTEST_PATH}/libdw/ - cp ${S}/libdwfl/*.h ${D}${PTEST_PATH}/libdwfl/ - cp ${S}/libdwelf/*.h ${D}${PTEST_PATH}/libdwelf/ - cp ${S}/libasm/*.h ${D}${PTEST_PATH}/libasm/ - cp -r ${S}/tests/ ${D}${PTEST_PATH} - cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests - cp -r ${B}/config.h ${D}${PTEST_PATH} - cp -r ${B}/backends ${D}${PTEST_PATH} - cp -r ${B}/debuginfod ${D}${PTEST_PATH} - sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile - find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {} - fi -} - -EXTRA_OEMAKE:class-native = "" -EXTRA_OEMAKE:class-nativesdk = "" - -BBCLASSEXTEND = "native nativesdk" - -# Package utilities separately -PACKAGES =+ "${PN}-binutils libelf libasm libdw libdebuginfod" - -# Shared libraries are licensed GPL-2.0-only or GPL-3.0-or-later, binaries -# GPL-3.0-or-later. According to NEWS file: -# "The license is now GPLv2/LGPLv3+ for the libraries and GPLv3+ for stand-alone -# programs. There is now also a formal CONTRIBUTING document describing how to -# submit patches." -LICENSE:${PN}-binutils = "GPL-3.0-or-later" -LICENSE:${PN} = "GPL-3.0-or-later" -LICENSE:libelf = "GPL-2.0-only | LGPL-3.0-or-later" -LICENSE:libasm = "GPL-2.0-only | LGPL-3.0-or-later" -LICENSE:libdw = "GPL-2.0-only | LGPL-3.0-or-later" -LICENSE:libdebuginfod = "GPL-2.0-or-later | LGPL-3.0-or-later" - -FILES:${PN}-binutils = "\ - ${bindir}/eu-addr2line \ - ${bindir}/eu-ld \ - ${bindir}/eu-nm \ - ${bindir}/eu-readelf \ - ${bindir}/eu-size \ - ${bindir}/eu-strip" - -FILES:libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*" -FILES:libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*" -FILES:libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*" -FILES:libdebuginfod = "${libdir}/libdebuginfod-${PV}.so ${libdir}/libdebuginfod.so.*" -# Some packages have the version preceeding the .so instead properly -# versioned .so., so we need to reorder and repackage. -#FILES:${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so" -#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so" - -# The package contains symlinks that trip up insane -INSANE_SKIP:${MLPREFIX}libdw = "dev-so" -# The nlist binary in the tests uses explicitly minimal compiler flags -INSANE_SKIP:${PN}-ptest += "ldflags" - -# avoid stripping some generated binaries otherwise some of the tests such as test-nlist, -# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail -INHIBIT_PACKAGE_STRIP_FILES = "\ - ${PKGD}${PTEST_PATH}/tests/test-nlist \ - ${PKGD}${PTEST_PATH}/tests/elfstrmerge \ - ${PKGD}${PTEST_PATH}/tests/backtrace-child \ - ${PKGD}${PTEST_PATH}/tests/backtrace-data \ - ${PKGD}${PTEST_PATH}/tests/backtrace-dwarf \ - ${PKGD}${PTEST_PATH}/tests/deleted \ - ${PKGD}${PTEST_PATH}/tests/dwfllines \ - ${PKGD}${PTEST_PATH}/src/strip \ - ${PKGD}${PTEST_PATH}/src/addr2line \ - ${PKGD}${PTEST_PATH}/src/elfcmp \ - ${PKGD}${PTEST_PATH}/src/objdump \ - ${PKGD}${PTEST_PATH}/src/readelf \ - ${PKGD}${PTEST_PATH}/src/nm \ - ${PKGD}${PTEST_PATH}/src/elflint \ - ${PKGD}${PTEST_PATH}/src/elfclassify \ - ${PKGD}${PTEST_PATH}/src/stack \ - ${PKGD}${PTEST_PATH}/src/unstrip \ - ${PKGD}${PTEST_PATH}/libelf/libelf.so \ - ${PKGD}${PTEST_PATH}/libdw/libdw.so \ - ${PKGD}${PTEST_PATH}/libasm/libasm.so \ - ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \ - ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \ -" - -PRIVATE_LIBS:${PN}-ptest = "libdw.so.1 libelf.so.1 libasm.so.1 libdebuginfod.so.1" diff --git a/meta/recipes-devtools/elfutils/elfutils_0.189.bb b/meta/recipes-devtools/elfutils/elfutils_0.189.bb new file mode 100644 index 0000000000..236f8cef92 --- /dev/null +++ b/meta/recipes-devtools/elfutils/elfutils_0.189.bb @@ -0,0 +1,171 @@ +SUMMARY = "Utilities and libraries for handling compiled object files" +HOMEPAGE = "https://sourceware.org/elfutils" +DESCRIPTION = "elfutils is a collection of utilities and libraries to read, create and modify ELF binary files, find and handle DWARF debug data, symbols, thread state and stacktraces for processes and core files on GNU/Linux." +SECTION = "base" +LICENSE = "GPL-2.0-only & GPL-2.0-or-later & LGPL-3.0-or-later & GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://debuginfod/debuginfod-client.c;endline=28;md5=f0a7c3170776866ee94e8f9225a6ad79 \ + " +DEPENDS = "zlib virtual/libintl" +DEPENDS:append:libc-musl = " argp-standalone fts musl-obstack " +# The Debian patches below are from: +# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz +SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \ + file://run-ptest \ + file://0001-dso-link-change.patch \ + file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \ + file://0003-fixheadercheck.patch \ + file://0006-Fix-build-on-aarch64-musl.patch \ + file://0001-libasm-may-link-with-libbz2-if-found.patch \ + file://0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch \ + file://0001-skip-the-test-when-gcc-not-deployed.patch \ + file://ptest.patch \ + file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \ + " +SRC_URI:append:libc-musl = " \ + file://0003-musl-utils.patch \ + file://0015-config-eu.am-do-not-use-Werror.patch \ + " +SRC_URI[sha256sum] = "39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8" + +inherit autotools gettext ptest pkgconfig + +EXTRA_OECONF = "--program-prefix=eu-" + +BUILD_CFLAGS += "-Wno-error=stringop-overflow" + +DEPENDS_BZIP2 = "bzip2-replacement-native" +DEPENDS_BZIP2:class-target = "bzip2" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'debuginfod', 'debuginfod libdebuginfod', '', d)}" +PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}" +PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz" +PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" +PACKAGECONFIG[libdebuginfod] = "--enable-libdebuginfod,--disable-libdebuginfod,curl" +PACKAGECONFIG[debuginfod] = "--enable-debuginfod,--disable-debuginfod,libarchive sqlite3 libmicrohttpd" + +RDEPENDS:${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils iproute2-ss bsdtar gcc-symlinks binutils-symlinks libgcc-dev" + +EXTRA_OECONF:append:class-target = " --disable-tests-rpath" + +# symver functions not currently supported on microblaze +EXTRA_OECONF:append:class-target:microblaze = " --disable-symbol-versioning" + +RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils glibc-dbg glibc-dev" +INSANE_SKIP:${PN}-ptest = "debug-deps dev-deps" + +do_compile_ptest() { + cd ${B}/tests + oe_runmake buildtest-TESTS oecheck +} +PTEST_PARALLEL_MAKE = "" + +do_install_ptest() { + if [ ${PTEST_ENABLED} = "1" ]; then + # copy the files which needed by the cases + TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint elfcompress elfclassify stack unstrip" + install -d -m 755 ${D}${PTEST_PATH}/src + install -d -m 755 ${D}${PTEST_PATH}/lib + install -d -m 755 ${D}${PTEST_PATH}/libelf + install -d -m 755 ${D}${PTEST_PATH}/libdw + install -d -m 755 ${D}${PTEST_PATH}/libdwfl + install -d -m 755 ${D}${PTEST_PATH}/libdwelf + install -d -m 755 ${D}${PTEST_PATH}/libasm + install -d -m 755 ${D}${PTEST_PATH}/libcpu + install -d -m 755 ${D}${PTEST_PATH}/libebl + for test_file in ${TEST_FILES}; do + if [ -f ${B}/src/${test_file} ]; then + cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src + fi + done + cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so + cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so + cp ${D}${libdir}/libasm-${PV}.so ${D}${PTEST_PATH}/libasm/libasm.so + cp ${B}/libcpu/libcpu.a ${D}${PTEST_PATH}/libcpu/ + cp ${B}/libebl/libebl.a ${D}${PTEST_PATH}/libebl/ + cp ${B}/lib/libeu.a ${D}${PTEST_PATH}/lib/ + cp ${S}/libelf/*.h ${D}${PTEST_PATH}/libelf/ + cp ${S}/libdw/*.h ${D}${PTEST_PATH}/libdw/ + cp ${S}/libdwfl/*.h ${D}${PTEST_PATH}/libdwfl/ + cp ${S}/libdwelf/*.h ${D}${PTEST_PATH}/libdwelf/ + cp ${S}/libasm/*.h ${D}${PTEST_PATH}/libasm/ + cp -r ${S}/tests/ ${D}${PTEST_PATH} + cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests + cp -r ${B}/config.h ${D}${PTEST_PATH} + cp -r ${B}/backends ${D}${PTEST_PATH} + cp -r ${B}/debuginfod ${D}${PTEST_PATH} + sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile + find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {} + fi +} + +EXTRA_OEMAKE:class-native = "" +EXTRA_OEMAKE:class-nativesdk = "" + +BBCLASSEXTEND = "native nativesdk" + +# Package utilities separately +PACKAGES =+ "${PN}-binutils libelf libasm libdw libdebuginfod" + +# Shared libraries are licensed GPL-2.0-only or GPL-3.0-or-later, binaries +# GPL-3.0-or-later. According to NEWS file: +# "The license is now GPLv2/LGPLv3+ for the libraries and GPLv3+ for stand-alone +# programs. There is now also a formal CONTRIBUTING document describing how to +# submit patches." +LICENSE:${PN}-binutils = "GPL-3.0-or-later" +LICENSE:${PN} = "GPL-3.0-or-later" +LICENSE:libelf = "GPL-2.0-only | LGPL-3.0-or-later" +LICENSE:libasm = "GPL-2.0-only | LGPL-3.0-or-later" +LICENSE:libdw = "GPL-2.0-only | LGPL-3.0-or-later" +LICENSE:libdebuginfod = "GPL-2.0-or-later | LGPL-3.0-or-later" + +FILES:${PN}-binutils = "\ + ${bindir}/eu-addr2line \ + ${bindir}/eu-ld \ + ${bindir}/eu-nm \ + ${bindir}/eu-readelf \ + ${bindir}/eu-size \ + ${bindir}/eu-strip" + +FILES:libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*" +FILES:libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*" +FILES:libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*" +FILES:libdebuginfod = "${libdir}/libdebuginfod-${PV}.so ${libdir}/libdebuginfod.so.*" +# Some packages have the version preceeding the .so instead properly +# versioned .so., so we need to reorder and repackage. +#FILES:${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so" +#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so" + +# The package contains symlinks that trip up insane +INSANE_SKIP:${MLPREFIX}libdw = "dev-so" +# The nlist binary in the tests uses explicitly minimal compiler flags +INSANE_SKIP:${PN}-ptest += "ldflags" + +# avoid stripping some generated binaries otherwise some of the tests such as test-nlist, +# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail +INHIBIT_PACKAGE_STRIP_FILES = "\ + ${PKGD}${PTEST_PATH}/tests/test-nlist \ + ${PKGD}${PTEST_PATH}/tests/elfstrmerge \ + ${PKGD}${PTEST_PATH}/tests/backtrace-child \ + ${PKGD}${PTEST_PATH}/tests/backtrace-data \ + ${PKGD}${PTEST_PATH}/tests/backtrace-dwarf \ + ${PKGD}${PTEST_PATH}/tests/deleted \ + ${PKGD}${PTEST_PATH}/tests/dwfllines \ + ${PKGD}${PTEST_PATH}/src/strip \ + ${PKGD}${PTEST_PATH}/src/addr2line \ + ${PKGD}${PTEST_PATH}/src/elfcmp \ + ${PKGD}${PTEST_PATH}/src/objdump \ + ${PKGD}${PTEST_PATH}/src/readelf \ + ${PKGD}${PTEST_PATH}/src/nm \ + ${PKGD}${PTEST_PATH}/src/elflint \ + ${PKGD}${PTEST_PATH}/src/elfclassify \ + ${PKGD}${PTEST_PATH}/src/stack \ + ${PKGD}${PTEST_PATH}/src/unstrip \ + ${PKGD}${PTEST_PATH}/libelf/libelf.so \ + ${PKGD}${PTEST_PATH}/libdw/libdw.so \ + ${PKGD}${PTEST_PATH}/libasm/libasm.so \ + ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \ + ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \ +" + +PRIVATE_LIBS:${PN}-ptest = "libdw.so.1 libelf.so.1 libasm.so.1 libdebuginfod.so.1" 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 @@ -From d2bf497b12fbd49b4996ccf0744303ffd67735b1 Mon Sep 17 00:00:00 2001 -From: Andrew Paprocki -Date: Wed, 21 Dec 2022 11:15:00 -0500 -Subject: [PATCH] PR29926: debuginfod: Fix usage of deprecated CURLINFO_* - -The `CURLINFO_SIZE_DOWNLOAD_T` and `CURLINFO_CONTENT_LENGTH_DOWNLOAD_T` -identifiers are `enum`s, not pre-processor definitions, so the current -`#ifdef` logic is not selecting the newer API. This results in the -older identifiers being used and they now generate errors when compiled -against Curl 7.87, which has silently deprecated them, causing GCC to -emit `-Werror=deprecated-declarations`. - -Instead, the newer identifiers were added in Curl 7.55, so explicitly -check for `CURL_AT_LEAST_VERSION(7, 55, 0)` instead of the current -logic. This eliminates the error when compiling against Curl 7.87. - -Ref: https://github.com/curl/curl/pull/1511 - -Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=d2bf497b12fbd49b4996ccf0744303ffd67735b1] -Signed-off-by: Andrew Paprocki ---- - debuginfod/debuginfod-client.c | 4 ++-- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c -index 8873fcc8..692aecce 100644 ---- a/debuginfod/debuginfod-client.c -+++ b/debuginfod/debuginfod-client.c -@@ -1456,7 +1456,7 @@ debuginfod_query_server (debuginfod_client *c, - deflate-compressing proxies, this number is likely to be - unavailable, so -1 may show. */ - CURLcode curl_res; --#ifdef CURLINFO_CONTENT_LENGTH_DOWNLOAD_T -+#if CURL_AT_LEAST_VERSION(7, 55, 0) - curl_off_t cl; - curl_res = curl_easy_getinfo(target_handle, - CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, -@@ -1491,7 +1491,7 @@ debuginfod_query_server (debuginfod_client *c, - if (target_handle) /* we've committed to a server; report its download progress */ - { - CURLcode curl_res; --#ifdef CURLINFO_SIZE_DOWNLOAD_T -+#if CURL_AT_LEAST_VERSION(7, 55, 0) - curl_off_t dl; - curl_res = curl_easy_getinfo(target_handle, - CURLINFO_SIZE_DOWNLOAD_T, --- -2.39.1 - 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 @@ -From 6560fb26a62ef135a804357ef4f15a47de3e49b3 Mon Sep 17 00:00:00 2001 -From: Mark Wielaard -Date: Tue, 10 Jan 2023 23:20:41 +0100 -Subject: [PATCH] debuginfod-client: Use CURLOPT_PROTOCOLS_STR for libcurl >= 7.85.0 - -https://sourceware.org/bugzilla/show_bug.cgi?id=29926 - -Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=6560fb26a62ef135a804357ef4f15a47de3e49b3] -Signed-off-by: Mark Wielaard ---- - debuginfod/debuginfod-client.c | 5 +++++ - 2 files changed, 10 insertions(+) - -diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c -index a16165bd..1ce45632 100644 ---- a/debuginfod/debuginfod-client.c -+++ b/debuginfod/debuginfod-client.c -@@ -1336,8 +1336,13 @@ debuginfod_query_server (debuginfod_client *c, - - /* Only allow http:// + https:// + file:// so we aren't being - redirected to some unsupported protocol. */ -+#if CURL_AT_LEAST_VERSION(7, 85, 0) -+ curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS_STR, -+ "http,https,file"); -+#else - curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS, - (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE)); -+#endif - curl_easy_setopt_ck(data[i].handle, CURLOPT_URL, data[i].url); - if (vfd >= 0) - curl_easy_setopt_ck(data[i].handle, CURLOPT_ERRORBUFFER, --- -2.39.1 - 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 --- config/eu.am | 2 -- 1 file changed, 2 deletions(-) - diff --git a/config/eu.am b/config/eu.am -index 58cd3c4..ac42390 100644 +index e6c241f..4136e7c 100644 --- a/config/eu.am +++ b/config/eu.am -@@ -91,7 +91,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ - -Wold-style-definition -Wstrict-prototypes $(TRAMPOLINES_WARNING) \ +@@ -99,7 +99,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \ $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \ + $(USE_AFTER_FREE3_WARNING) \ - $(if $($(*F)_no_Werror),,-Werror) \ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \ -@@ -101,7 +100,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \ +@@ -109,7 +108,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \ $(TRAMPOLINES_WARNING) \ $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \ $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \ @@ -35,3 +34,4 @@ index 58cd3c4..ac42390 100644 $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \ +-- 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 @@ -From: Mark Wielaard -Date: Thu, 26 Jan 2023 17:19:15 +0000 (+0100) -Subject: backends: Handle DW_TAG_unspecified_type in dwarf_peeled_die_type -X-Git-Url: https://sourceware.org/git/?p=elfutils.git;a=commitdiff_plain;h=f2c522567ad63ac293535fba9704895e685ab5bc;hp=3fa98a6f29b0f370e32549ead7eb897c839af980 - -backends: Handle DW_TAG_unspecified_type in dwarf_peeled_die_type - -binutils 2.40 introduces DW_TAG_unspecified_type for assembly -functions with an unknown return type. This breaks the -run-funcretval.sh testcase because dwfl_module_return_value_location -returns an error for such functions because it cannot determine the -return value location. Fix that by treating DW_TAG_unspecified_type -as if the DIE doesn't have a DW_AT_type. - -Also update the testcase to explicitly checking for -DW_TAG_unspecified_type and printing "returns unspecified type". - -https://sourceware.org/bugzilla/show_bug.cgi?id=30047 - -Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=f2c522567ad63ac293535fba9704895e685ab5bc;hp=3fa98a6f29b0f370e32549ead7eb897c839af980] -Signed-off-by: Mark Wielaard ---- - ---- a/backends/libebl_CPU.h -+++ b/backends/libebl_CPU.h -@@ -1,5 +1,6 @@ - /* Common interface for libebl modules. - Copyright (C) 2000, 2001, 2002, 2003, 2005, 2013, 2014 Red Hat, Inc. -+ Copyright (C) 2023 Mark J. Wielaard - This file is part of elfutils. - - This file is free software; you can redistribute it and/or modify -@@ -53,7 +54,9 @@ extern bool (*generic_debugscn_p) (const - dwarf_tag (_die); }) - - /* Get a type die corresponding to DIE. Peel CV qualifiers off -- it. */ -+ it. Returns zero if the DIE doesn't have a type, or the type -+ is DW_TAG_unspecified_type. Returns -1 on error. Otherwise -+ returns the result tag DW_AT value. */ - static inline int - dwarf_peeled_die_type (Dwarf_Die *die, Dwarf_Die *result) - { -@@ -69,7 +72,14 @@ dwarf_peeled_die_type (Dwarf_Die *die, D - if (dwarf_peel_type (result, result) != 0) - return -1; - -- return DWARF_TAG_OR_RETURN (result); -+ if (result == NULL) -+ return -1; -+ -+ int tag = dwarf_tag (result); -+ if (tag == DW_TAG_unspecified_type) -+ return 0; /* Treat an unspecified type as if there was no type. */ -+ -+ return tag; - } - - #endif /* libebl_CPU.h */ ---- a/tests/funcretval.c -+++ b/tests/funcretval.c -@@ -1,5 +1,6 @@ - /* Test program for dwfl_module_return_value_location. - Copyright (C) 2005 Red Hat, Inc. -+ Copyright (C) 2023 Mark J. Wielaard - This file is part of elfutils. - - This file is free software; you can redistribute it and/or modify -@@ -67,7 +68,18 @@ handle_function (Dwarf_Die *funcdie, voi - error (EXIT_FAILURE, 0, "dwfl_module_return_value_location: %s", - dwfl_errmsg (-1)); - else if (nlocops == 0) -- puts ("returns no value"); -+ { -+ // Check if this is the special unspecified type -+ // https://sourceware.org/bugzilla/show_bug.cgi?id=30047 -+ Dwarf_Die die_mem, *typedie = &die_mem; -+ Dwarf_Attribute attr_mem, *attr; -+ attr = dwarf_attr_integrate (funcdie, DW_AT_type, &attr_mem); -+ if (dwarf_formref_die (attr, typedie) != NULL -+ && dwarf_tag (typedie) == DW_TAG_unspecified_type) -+ puts ("returns unspecified type"); -+ else -+ puts ("returns no value"); -+ } - else - { - printf ("return value location:"); -- cgit v1.2.3-54-g00ecf