From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7D2DF158066 for ; Tue, 3 Sep 2024 08:58:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A5AA6E29FF; Tue, 3 Sep 2024 08:58:53 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8DC3CE29FF for ; Tue, 3 Sep 2024 08:58:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 59C5D34314C for ; Tue, 3 Sep 2024 08:58:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B3D181DF9 for ; Tue, 3 Sep 2024 08:58:50 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1725353893.074703d997f81d4632e8f69d88a113c81e3220d4.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/kernel-build.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 074703d997f81d4632e8f69d88a113c81e3220d4 X-VCS-Branch: master Date: Tue, 3 Sep 2024 08:58:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ec8602d9-b2a9-40d3-bedf-a25a71341967 X-Archives-Hash: 186e4d695882e82a9ae620e3e6af4799 commit: 074703d997f81d4632e8f69d88a113c81e3220d4 Author: Sam James gentoo org> AuthorDate: Tue Sep 3 06:50:38 2024 +0000 Commit: Sam James gentoo org> CommitDate: Tue Sep 3 08:58:13 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=074703d9 kernel-build.eclass: handle CTF if enabled genpatches will soon be adding optional CTF debug information support via a patch. If it's enabled, we need to call a few special make targets to create and install the CTF information. We also need to avoid stripping the CTF archive. Signed-off-by: Sam James gentoo.org> eclass/kernel-build.eclass | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index 10fd0cca2cc5..1fc86c4a2208 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -296,7 +296,13 @@ kernel-build_src_configure() { kernel-build_src_compile() { debug-print-function ${FUNCNAME} "${@}" - emake O="${WORKDIR}"/build "${MAKEARGS[@]}" all + local targets=( all ) + + if grep -q "CONFIG_CTF=y" "${WORKDIR}/modprep/.config"; then + targets+=( ctf ) + fi + + emake O="${WORKDIR}"/build "${MAKEARGS[@]}" "${targets[@]}" } # @FUNCTION: kernel-build_src_test @@ -337,6 +343,10 @@ kernel-build_src_install() { targets+=( dtbs_install ) fi + if grep -q "CONFIG_CTF=y" "${WORKDIR}/modprep/.config"; then + targets+=( ctf_install ) + fi + # Use the kernel build system to strip, this ensures the modules # are stripped *before* they are signed or compressed. local strip_args @@ -430,6 +440,7 @@ kernel-build_src_install() { mv "build/vmlinux" "${ED}${kernel_dir}/vmlinux" || die fi dostrip -x "${kernel_dir}/vmlinux" + dostrip -x "${kernel_dir}/vmlinux.ctfa" fi # strip empty directories