From 706cc0eb21e38776fe17dcbbac4d05d8d530952d Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Mon, 30 Nov 2020 14:43:14 +0100 Subject: [PATCH] dev-util/dwarves: update to 1.19 for CONFIG_DEBUG_INFO_BTF It is already possible to enable kernel config `CONFIG_DEBUG_INFO_BTF` using dwarves 1.18 included in the current Flatcar SDK, as long as its arch is amd64. However, Kernel build fails in case of arm64, when Kernel version is >= 5.9 and dwarves version is <= 1.18, like the following: ``` + pahole -J .tmp_vmlinux.btf PAHOLE: Error: Found symbol of zero size when encoding btf (sym: '__kvm_nvhe_arm64_ssbd_callback_required', cu: '../source/arch/arm64/kernel/cpu_errata.c'). PAHOLE: Error: Use '-j' or '--force' to ignore such symbols and force emit the btf. ../source/scripts/link-vmlinux.sh: line 141: 1929102 Segmentation fault ``` The bug was fixed via https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=2e719cca6672, ("btf_encoder: revamp how per-CPU variables are encoded"). The fix was first included in dwarves [1.19](https://git.kernel.org/pub/scm/devel/pahole/pahole.git/tag/?h=v1.19). Thus we need to get dwarves 1.19 included in Flatcar SDK, so that the next Alpha Kernels could have `CONFIG_DEBUG_INFO_BTF` enabled. --- .../portage-stable/dev-util/dwarves/Manifest | 1 + .../dev-util/dwarves/dwarves-1.19.ebuild | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/dev-util/dwarves/dwarves-1.19.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-util/dwarves/Manifest b/sdk_container/src/third_party/portage-stable/dev-util/dwarves/Manifest index 31948b9303..3f5bf203b0 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/dwarves/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-util/dwarves/Manifest @@ -1,2 +1,3 @@ DIST dwarves-1.17.tar.xz 309028 BLAKE2B 600d095359fa1ef208cc83655761505a07512faf9957144cc5fdd9e69bef98be3afc8b29a4c13aa0246aa43fdc9b4906de95f37c86fc6790ece52a79e3b13695 SHA512 8916ea24316efe1eb322d045fb2d81c230905f2fe33942eac641e9e0311f33a3bcf55be454eac32781799c255303bafacd8f1bd1b3ec08f0dae4d5f38d8186ba DIST dwarves-1.18.tar.xz 324912 BLAKE2B bdce2903608a1229e2fc7e8a01bc41249a17a1a003fc3616910959fc43b430569cd737a220edfab2473485cd2dc0519b4add0e0e3a690e51ad35c4fa082752a5 SHA512 01647607ce0f4dfceb464367f2dd8a432f33eb5d0e003b6bbb07b38bd992a2992844309b04aee2a0388658c41d8b2059d03064c6e450fe7c347c5bca445d7938 +DIST dwarves-1.19.tar.xz 686136 BLAKE2B f7fe50be30fa9b247bf0f35d5dec6aa8f1bed44eaaf8a2cde8da6f65a870212c2d257740a6d4f94da24f365ad49259d53c4f5447921b22754c63184001029620 SHA512 b378a504da5b00c6280b9efda7348c2d61015ce6477f3e4e4466f58d9bf6837457cd0aa9263b7d921093cca5ee26c4fab9950f7f75ca05d27ae646b3bfe22f9a diff --git a/sdk_container/src/third_party/portage-stable/dev-util/dwarves/dwarves-1.19.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/dwarves/dwarves-1.19.ebuild new file mode 100644 index 0000000000..6f49ba5b8a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/dwarves/dwarves-1.19.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7} ) +inherit multilib cmake python-single-r1 + +DESCRIPTION="pahole (Poke-a-Hole) and other DWARF2 utilities" +HOMEPAGE="https://git.kernel.org/cgit/devel/pahole/pahole.git/" + +LICENSE="GPL-2" # only +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~x86" +IUSE="debug" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + >=dev-libs/elfutils-0.178 + sys-libs/zlib" +DEPEND="${RDEPEND}" + +if [[ ${PV//_p} == ${PV} ]]; then + SRC_URI="http://fedorapeople.org/~acme/dwarves/${P}.tar.xz" +else + SRC_URI="https://dev.gentoo.org/~zzam/${PN}/${P}.tar.xz" +fi + +DOCS=( README README.ctracer NEWS ) + +PATCHES=( + "${FILESDIR}"/${PN}-1.10-python-import.patch +) + +src_configure() { + local mycmakeargs=( "-D__LIB=$(get_libdir)" ) + cmake_src_configure +} + +src_test() { :; } + +src_install() { + cmake_src_install +}