Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Documentation: kbuild: Update the debug information notes in reproducible-builds.rst

The debug information part of the "Absolute filenames" section in the
reproducible builds document only mentions providing
'-fdebug-prefix-map' to KCFLAGS but it needs to be provided to KAFLAGS
as well since debug information has been generated for assembly files
for a long time.

Additionally, mention that the build directory may also appear as an
absolute path in the debug information (via DW_AT_comp_dir), so it needs
to be overridden via '-fdebug-prefix-map' as well.

Reported-by: Alexander Coffin <alex@cyberialabs.net>
Closes: https://lore.kernel.org/b8dfe7035d19fd611b9be55ee3145fdb@purelymail.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20260313-kbuild-docs-repro-builds-fdebug-prefix-map-updates-v1-1-3aeeef7fa710@kernel.org
Signed-off-by: Nicolas Schier <nsc@kernel.org>

authored by

Nathan Chancellor and committed by
Nicolas Schier
2fb62d91 c7c55f0e

+5 -2
+5 -2
Documentation/kbuild/reproducible-builds.rst
··· 50 50 ------------------ 51 51 52 52 When the kernel is built out-of-tree, debug information may include 53 - absolute filenames for the source files. This must be overridden by 54 - including the ``-fdebug-prefix-map`` option in the `KCFLAGS`_ variable. 53 + absolute filenames for the source files and build directory. These must 54 + be overridden by including a ``-fdebug-prefix-map`` option for each in 55 + the `KCFLAGS`_ and `KAFLAGS`_ variables to cover both ``.c`` and ``.S`` 56 + files. 55 57 56 58 Depending on the compiler used, the ``__FILE__`` macro may also expand 57 59 to an absolute filename in an out-of-tree build. Kbuild automatically ··· 137 135 .. _KBUILD_BUILD_TIMESTAMP: kbuild.html#kbuild-build-timestamp 138 136 .. _KBUILD_BUILD_USER and KBUILD_BUILD_HOST: kbuild.html#kbuild-build-user-kbuild-build-host 139 137 .. _KCFLAGS: kbuild.html#kcflags 138 + .. _KAFLAGS: kbuild.html#kaflags 140 139 .. _prefix-map options: https://reproducible-builds.org/docs/build-path/ 141 140 .. _Reproducible Builds project: https://reproducible-builds.org/ 142 141 .. _SOURCE_DATE_EPOCH: https://reproducible-builds.org/docs/source-date-epoch/