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.

kbuild: rpm-pkg: Add (elfutils-devel or libdw-devel) to BuildRequires

The dwarf.h header, which is included by
scripts/gendwarfksyms/gendwarfksyms.h, resides within elfutils-devel
or libdw-devel package.

This portion of the code is compiled under the condition that
CONFIG_GENDWARFKSYMS is enabled.

Consequently, add (elfutils-devel or libdw-devel) to BuildRequires to
prevent unforeseen compilation failures.

Fix follow possible error:
In file included from scripts/gendwarfksyms/cache.c:6:
scripts/gendwarfksyms/gendwarfksyms.h:6:10: fatal error: 'dwarf.h' file not found
6 | #include <dwarf.h>
| ^~~~~~~~~

Link: https://lore.kernel.org/all/3e52d80d-0c60-4df5-8cb5-21d4b1fce7b7@suse.com/
Fixes: f28568841ae0 ("tools: Add gendwarfksyms")
Suggested-by: Petr Pavlu <petr.pavlu@suse.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Reviewed-by: Nicolas Schier <n.schier@avm.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by

WangYuli and committed by
Masahiro Yamada
5bd6bdd0 657f96cb

+1
+1
scripts/package/kernel.spec
··· 16 16 Source2: diff.patch 17 17 Provides: kernel-%{KERNELRELEASE} 18 18 BuildRequires: bc binutils bison dwarves 19 + BuildRequires: (elfutils-devel or libdw-devel) 19 20 BuildRequires: (elfutils-libelf-devel or libelf-devel) flex 20 21 BuildRequires: gcc make openssl openssl-devel perl python3 rsync 21 22