History

Merge tag 'kbuild-fixes-7.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux

Pull Kbuild fixes from Nathan Chancellor: - Fix regression with MO= when building out of tree kernel modules due to incorrectly overwriting build tree's Makefile - Avoid stripping .BTF sections from modules when building debug .rpm packages * tag 'kbuild-fixes-7.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux: kbuild: rpm-pkg: Preserve BTF sections in kernel modules during debuginfo stripping kbuild: Stop modifying $(objtree)/Makefile when building oot-kmods oos

Linus Torvalds committed 3 months ago

Commit 02dc6992 parents 2aa6a5e e5a259d2 files · +14 −5Browse files

Unified · Split

2 files
  1. Makefile +3 −5
  2. scripts/package/kernel.spec +11 −0
Makefile+3−5
@@ -700,13 +700,11 @@ filechk_makefile = { \ · 699 unmodified lines
700 echo "include $(abs_srctree)/Makefile"; \700 echo "include $(abs_srctree)/Makefile"; \
701 }701 }
702 702
703$(objtree)/Makefile: FORCE703PHONY += $(CURDIR)/Makefile
704$(CURDIR)/Makefile: FORCE
704 $(call filechk,makefile)705 $(call filechk,makefile)
705 706
706# Prevent $(srcroot)/Makefile from inhibiting the rule to run.707outputmakefile: $(CURDIR)/Makefile
707PHONY += $(objtree)/Makefile
708
709outputmakefile: $(objtree)/Makefile
710ifeq ($(KBUILD_EXTMOD),)708ifeq ($(KBUILD_EXTMOD),)
711 @if [ -f $(srctree)/.config -o \709 @if [ -f $(srctree)/.config -o \
712 -d $(srctree)/include/config -o \710 -d $(srctree)/include/config -o \
scripts/package/kernel.spec+11−0
@@ -67,7 +67,18 @@ This package provides debug information for the kernel image and modules from th · 66 unmodified lines
67%undefine _unique_debug_srcs67%undefine _unique_debug_srcs
68%undefine _debugsource_packages68%undefine _debugsource_packages
69%undefine _debuginfo_subpackages69%undefine _debuginfo_subpackages
70
71# Preserve .BTF and .BTF.base sections in kernel modules during debuginfo
72# stripping. find-debuginfo.sh uses eu-strip which removes non-allocated ELF
73# sections like .BTF by default. .BTF.base is required for BTF distillation
74# support; without it, module BTF validation fails.
75%global with_keep_section %(%{__find_debuginfo} --help 2>&1 | grep -c keep-section)
76%if %{with_keep_section}
77%global _find_debuginfo_opts -r --keep-section .BTF --keep-section .BTF.base
78%else
70%global _find_debuginfo_opts -r79%global _find_debuginfo_opts -r
80%endif
81
71%global _missing_build_ids_terminate_build 182%global _missing_build_ids_terminate_build 1
72%global _no_recompute_build_ids 183%global _no_recompute_build_ids 1
73%{debug_package}84%{debug_package}