diff options
author | Martin Kletzander <nert.pinx@gmail.com> | 2022-06-23 14:07:35 +0200 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-07-04 00:54:00 +0100 |
commit | 0aaa5a38da97a09aa9e03302e3eddbb858cf7139 (patch) | |
tree | 304d42d71cee143097f5dd24f3974583061384ce | |
parent | media-libs/ilmbase: drop 2.5.7-r2, 2.5.7-r3 (diff) | |
download | gentoo-0aaa5a38.tar.gz gentoo-0aaa5a38.tar.bz2 gentoo-0aaa5a38.zip |
kernel-build.eclass: Properly install vmlinux(.debug)
Previously, in commit ad3b55e32736 we installed vmlinux with debug
symbols, but two issues remained. Firstly, the debug symbols were
stripped (and optionally extracted), and secondly the build-id was
changed due to how estrip works.
In order to make systemtap work without complaining about missing
debuginfo and mismatch of build-id from the running kernel install the
whole vmlinux and exclude it from stripping.
Signed-off-by: Martin Kletzander <nert.pinx@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26065
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | eclass/kernel-build.eclass | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index dbd9080ab98a..750a8e873d98 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -196,16 +196,17 @@ kernel-build_src_install() { local image_path=$(dist-kernel_get_image_path) cp -p "build/${image_path}" "${ED}/usr/src/linux-${ver}/${image_path}" || die - # Install the unstripped uncompressed vmlinux for use with systemtap - # etc. Use mv rather than doins for the same reason as above -- - # space and time. - if use debug; then - mv build/vmlinux "${ED}/usr/src/linux-${ver}/" || die - fi - # building modules fails with 'vmlinux has no symtab?' if stripped use ppc64 && dostrip -x "/usr/src/linux-${ver}/${image_path}" + # Install vmlinux with debuginfo when requested + if use debug; then + if [[ "${image_path}" != "vmlinux" ]]; then + mv "build/vmlinux" "${ED}/usr/src/linux-${ver}/vmlinux" || die + fi + dostrip -x "/usr/src/linux-${ver}/vmlinux" + fi + # strip empty directories find "${D}" -type d -empty -exec rmdir {} + || die |