From: Greg Kroah-Hartman Date: Thu, 16 Mar 2023 08:24:33 +0000 (+0100) Subject: 5.15-stable patches X-Git-Tag: v4.14.310~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=272c161f364c9dfcedb084d885cf72a52802cbe6;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: makefile-use-gdwarf-4-5-for-assembler-for-debug_info_dwarf-4-5.patch --- diff --git a/queue-5.15/makefile-use-gdwarf-4-5-for-assembler-for-debug_info_dwarf-4-5.patch b/queue-5.15/makefile-use-gdwarf-4-5-for-assembler-for-debug_info_dwarf-4-5.patch new file mode 100644 index 00000000000..10eb763f697 --- /dev/null +++ b/queue-5.15/makefile-use-gdwarf-4-5-for-assembler-for-debug_info_dwarf-4-5.patch @@ -0,0 +1,47 @@ +From ndesaulniers@google.com Thu Mar 16 09:23:48 2023 +From: Nick Desaulniers +Date: Wed, 15 Mar 2023 14:40:59 -0700 +Subject: Makefile: use -gdwarf-{4|5} for assembler for DEBUG_INFO_DWARF{4|5} +To: Greg Kroah-Hartman , sashal@kernel.org, stable@vger.kernel.org +Cc: Masahiro Yamada , Nathan Chancellor , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nick Desaulniers , Lecopzer Chen +Message-ID: <20230315214059.395939-1-ndesaulniers@google.com> + +From: Nick Desaulniers + +This is _not_ an upstream commit and just for 5.15.y only. It is based +on upstream +commit 32ef9e5054ec ("Makefile.debug: re-enable debug info for .S files"). + +When the user has chosen not to use their compiler's implicit default +DWARF version (which changes over time) via selecting +- CONFIG_DEBUG_INFO_DWARF4 or +- CONFIG_DEBUG_INFO_DWARF5 +we need to tell the compiler this for Asm sources as well as C sources. +(We use the compiler to drive assembler jobs in kbuild, since most asm +needs to be preprocessed first). Otherwise, we will get object files +built from Asm sources with the compiler's implicit default DWARF +version. + +For example, selecting CONFIG_DEBUG_INFO_DWARF4 would produce a DWARFv5 +vmlinux, since it was a mix of DWARFv4 object files from C sources and +DWARFv5 object files from Asm sources when using Clang as the assembler +(ex. `make LLVM=1`). + +Fixes: 0ee2f0567a56 ("Makefile.debug: re-enable debug info for .S files") +Reported-by: Lecopzer Chen +Signed-off-by: Nick Desaulniers +Signed-off-by: Greg Kroah-Hartman +--- + Makefile | 1 + + 1 file changed, 1 insertion(+) + +--- a/Makefile ++++ b/Makefile +@@ -888,6 +888,7 @@ ifndef CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN + dwarf-version-$(CONFIG_DEBUG_INFO_DWARF4) := 4 + dwarf-version-$(CONFIG_DEBUG_INFO_DWARF5) := 5 + DEBUG_CFLAGS += -gdwarf-$(dwarf-version-y) ++KBUILD_AFLAGS += -gdwarf-$(dwarf-version-y) + endif + + ifdef CONFIG_DEBUG_INFO_REDUCED diff --git a/queue-5.15/series b/queue-5.15/series index 422f73152cc..fcb301fcf6d 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -134,3 +134,4 @@ fs-hold-writers-when-changing-mount-s-idmapping.patch kvm-nvmx-don-t-use-enlightened-msr-bitmap-for-l3.patch kvm-vmx-introduce-vmx_msr_bitmap_l01_changed-helper.patch kvm-vmx-fix-crash-due-to-uninitialized-current_vmcs.patch +makefile-use-gdwarf-4-5-for-assembler-for-debug_info_dwarf-4-5.patch