public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: venkata.pyla@toshiba-tsip.com
To: isar-users@googlegroups.com
Cc: venkata pyla <venkata.pyla@toshiba-tsip.com>,
	amikan@ilbers.de, jan.kiszka@siemens.com,
	kazuhiro3.hayashi@toshiba.co.jp, dinesh.kumar@toshiba-tsip.com,
	felix.moessbauer@siemens.com
Subject: [PATCH] linux: remove debug paths in assembly compilations for repro builds
Date: Tue,  9 May 2023 11:50:40 +0530	[thread overview]
Message-ID: <20230509062040.13244-1-venkata.pyla@toshiba-tsip.com> (raw)

From: venkata pyla <venkata.pyla@toshiba-tsip.com>

vmlinux file is not reproducible in case of arm architectures, where the
assembly files are compiled with debug info included with build paths,
so use `-fdebug-prefix-map` to substitute the paths and produce bit
identical builds.

Signed-off-by: venkata pyla <venkata.pyla@toshiba-tsip.com>
---
 meta/recipes-kernel/linux/files/debian/isar/build.tmpl | 2 +-
 meta/recipes-kernel/linux/linux-custom.inc             | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
index e7e04791..906dc580 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
@@ -22,7 +22,7 @@ do_build() {
     sed -i "s/@KR@/${KR}/g" ${S}/debian/control ${S}/debian/linux-image-${KERNEL_NAME_PROVIDED}.*
 
     # Build the Linux kernel
-    ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE} KCFLAGS="${KCFLAGS}"
+    ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE} KCFLAGS="${KCFLAGS}" KAFLAGS="${KAFLAGS}"
 
     # Stop tracing
     set +x
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 42501342..1404ab0b 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -80,6 +80,7 @@ TEMPLATE_VARS += "                \
     KERNEL_NAME_PROVIDED          \
     KERNEL_CONFIG_FRAGMENTS       \
     KCFLAGS                       \
+    KAFLAGS                       \
     DISTRIBUTOR                   \
 "
 
@@ -88,6 +89,7 @@ inherit template
 
 # Add custom cflags to the kernel build
 KCFLAGS ?= "-fdebug-prefix-map=${CURDIR}=."
+KAFLAGS ?= "-fdebug-prefix-map=${CURDIR}=."
 
 # Derive name of the kernel packages from the name of this recipe
 KERNEL_NAME_PROVIDED ?= "${@ d.getVar('PN').partition('linux-')[2]}"
-- 
2.20.1



             reply	other threads:[~2023-05-09  6:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09  6:20 venkata.pyla [this message]
2023-05-09  6:34 ` MOESSBAUER, Felix
2023-05-19  4:14 ` Uladzimir Bely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230509062040.13244-1-venkata.pyla@toshiba-tsip.com \
    --to=venkata.pyla@toshiba-tsip.com \
    --cc=amikan@ilbers.de \
    --cc=dinesh.kumar@toshiba-tsip.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kazuhiro3.hayashi@toshiba.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox