All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] RISC-V: Disable DWARF5 with known broken LLVM versions
@ 2023-12-05 23:53 ` Nathan Chancellor
  0 siblings, 0 replies; 16+ messages in thread
From: Nathan Chancellor @ 2023-12-05 23:53 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, conor
  Cc: maskray, ndesaulniers, linux-riscv, llvm, patches, Nathan Chancellor

Hi all,

This series disables DWARF5 for LLVM versions where it is known to be
broken due to linker relaxation:

https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6

If I understand correctly, it sounds like GNU binutils has a similar
issue but I am not sure of the status of the fixes and such, so I did
not bother with checking for it but it should be easy to add if so
desired.

---
Changes in v2:
- Added patch 3 with Fangrui's suggested improvements around
  CONFIG_AS_HAS_NON_CONST_LEB128.
- Pick up Fangrui's Reviewed-by on patch 1.
- Link to v1: https://lore.kernel.org/r/20231129-riscv-restrict-dwarf5-llvm-v1-0-ec0d368fb538@kernel.org

---
Nathan Chancellor (3):
      riscv: Hoist linker relaxation disabling logic into Kconfig
      riscv: Restrict DWARF5 when building with LLVM to known working versions
      lib/Kconfig.debug: Update AS_HAS_NON_CONST_LEB128 comment and name

 arch/riscv/Kconfig  | 14 ++++++++++++++
 arch/riscv/Makefile |  4 +---
 lib/Kconfig.debug   | 12 +++++++-----
 3 files changed, 22 insertions(+), 8 deletions(-)
---
base-commit: 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab
change-id: 20231129-riscv-restrict-dwarf5-llvm-a9824bb974cb

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 0/3] RISC-V: Disable DWARF5 with known broken LLVM versions
@ 2023-12-05 23:53 ` Nathan Chancellor
  0 siblings, 0 replies; 16+ messages in thread
From: Nathan Chancellor @ 2023-12-05 23:53 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, conor
  Cc: maskray, ndesaulniers, linux-riscv, llvm, patches, Nathan Chancellor

Hi all,

This series disables DWARF5 for LLVM versions where it is known to be
broken due to linker relaxation:

https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6

If I understand correctly, it sounds like GNU binutils has a similar
issue but I am not sure of the status of the fixes and such, so I did
not bother with checking for it but it should be easy to add if so
desired.

---
Changes in v2:
- Added patch 3 with Fangrui's suggested improvements around
  CONFIG_AS_HAS_NON_CONST_LEB128.
- Pick up Fangrui's Reviewed-by on patch 1.
- Link to v1: https://lore.kernel.org/r/20231129-riscv-restrict-dwarf5-llvm-v1-0-ec0d368fb538@kernel.org

---
Nathan Chancellor (3):
      riscv: Hoist linker relaxation disabling logic into Kconfig
      riscv: Restrict DWARF5 when building with LLVM to known working versions
      lib/Kconfig.debug: Update AS_HAS_NON_CONST_LEB128 comment and name

 arch/riscv/Kconfig  | 14 ++++++++++++++
 arch/riscv/Makefile |  4 +---
 lib/Kconfig.debug   | 12 +++++++-----
 3 files changed, 22 insertions(+), 8 deletions(-)
---
base-commit: 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab
change-id: 20231129-riscv-restrict-dwarf5-llvm-a9824bb974cb

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 1/3] riscv: Hoist linker relaxation disabling logic into Kconfig
  2023-12-05 23:53 ` Nathan Chancellor
@ 2023-12-05 23:53   ` Nathan Chancellor
  -1 siblings, 0 replies; 16+ messages in thread
From: Nathan Chancellor @ 2023-12-05 23:53 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, conor
  Cc: maskray, ndesaulniers, linux-riscv, llvm, patches, Nathan Chancellor

Certain configurations may need to be disabled if linker relaxation is
in use, such as DWARF5 with ld.lld < 18. Hoist the logic of whether or
not linker relaxation is in use into Kconfig so decisions can be made at
configuration time.

Reviewed-by: Fangrui Song <maskray@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 arch/riscv/Kconfig  | 5 +++++
 arch/riscv/Makefile | 4 +---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 95a2a06acc6a..72be1d8122a3 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -181,6 +181,11 @@ config HAVE_SHADOW_CALL_STACK
 	# https://github.com/riscv-non-isa/riscv-elf-psabi-doc/commit/a484e843e6eeb51f0cb7b8819e50da6d2444d769
 	depends on $(ld-option,--no-relax-gp)
 
+config RISCV_USE_LINKER_RELAXATION
+	def_bool y
+	# https://github.com/llvm/llvm-project/commit/6611d58f5bbcbec77262d392e2923e1d680f6985
+	depends on !LD_IS_LLD || LLD_VERSION >= 150000
+
 config ARCH_MMAP_RND_BITS_MIN
 	default 18 if 64BIT
 	default 8
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index a74be78678eb..e383aa9e2757 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -43,8 +43,7 @@ else
 	KBUILD_LDFLAGS += -melf32lriscv
 endif
 
-ifeq ($(CONFIG_LD_IS_LLD),y)
-ifeq ($(call test-lt, $(CONFIG_LLD_VERSION), 150000),y)
+ifndef CONFIG_RISCV_USE_LINKER_RELAXATION
 	KBUILD_CFLAGS += -mno-relax
 	KBUILD_AFLAGS += -mno-relax
 ifndef CONFIG_AS_IS_LLVM
@@ -52,7 +51,6 @@ ifndef CONFIG_AS_IS_LLVM
 	KBUILD_AFLAGS += -Wa,-mno-relax
 endif
 endif
-endif
 
 ifeq ($(CONFIG_SHADOW_CALL_STACK),y)
 	KBUILD_LDFLAGS += --no-relax-gp

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 1/3] riscv: Hoist linker relaxation disabling logic into Kconfig
@ 2023-12-05 23:53   ` Nathan Chancellor
  0 siblings, 0 replies; 16+ messages in thread
From: Nathan Chancellor @ 2023-12-05 23:53 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, conor
  Cc: maskray, ndesaulniers, linux-riscv, llvm, patches, Nathan Chancellor

Certain configurations may need to be disabled if linker relaxation is
in use, such as DWARF5 with ld.lld < 18. Hoist the logic of whether or
not linker relaxation is in use into Kconfig so decisions can be made at
configuration time.

Reviewed-by: Fangrui Song <maskray@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 arch/riscv/Kconfig  | 5 +++++
 arch/riscv/Makefile | 4 +---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 95a2a06acc6a..72be1d8122a3 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -181,6 +181,11 @@ config HAVE_SHADOW_CALL_STACK
 	# https://github.com/riscv-non-isa/riscv-elf-psabi-doc/commit/a484e843e6eeb51f0cb7b8819e50da6d2444d769
 	depends on $(ld-option,--no-relax-gp)
 
+config RISCV_USE_LINKER_RELAXATION
+	def_bool y
+	# https://github.com/llvm/llvm-project/commit/6611d58f5bbcbec77262d392e2923e1d680f6985
+	depends on !LD_IS_LLD || LLD_VERSION >= 150000
+
 config ARCH_MMAP_RND_BITS_MIN
 	default 18 if 64BIT
 	default 8
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index a74be78678eb..e383aa9e2757 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -43,8 +43,7 @@ else
 	KBUILD_LDFLAGS += -melf32lriscv
 endif
 
-ifeq ($(CONFIG_LD_IS_LLD),y)
-ifeq ($(call test-lt, $(CONFIG_LLD_VERSION), 150000),y)
+ifndef CONFIG_RISCV_USE_LINKER_RELAXATION
 	KBUILD_CFLAGS += -mno-relax
 	KBUILD_AFLAGS += -mno-relax
 ifndef CONFIG_AS_IS_LLVM
@@ -52,7 +51,6 @@ ifndef CONFIG_AS_IS_LLVM
 	KBUILD_AFLAGS += -Wa,-mno-relax
 endif
 endif
-endif
 
 ifeq ($(CONFIG_SHADOW_CALL_STACK),y)
 	KBUILD_LDFLAGS += --no-relax-gp

-- 
2.43.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 2/3] riscv: Restrict DWARF5 when building with LLVM to known working versions
  2023-12-05 23:53 ` Nathan Chancellor
@ 2023-12-05 23:53   ` Nathan Chancellor
  -1 siblings, 0 replies; 16+ messages in thread
From: Nathan Chancellor @ 2023-12-05 23:53 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, conor
  Cc: maskray, ndesaulniers, linux-riscv, llvm, patches, Nathan Chancellor

LLVM prior to 18.0.0 would generate incorrect debug info for DWARF5 due
to linker relaxation, which was worked around in clang by defaulting
RISC-V to DWARF4 [1]. Unfortunately, this workaround does not work for
the kernel because the DWARF version can be independently changed from
the default in Kconfig.

Do not allow DWARF5 to be selected for RISC-V when using linker
relaxation (ld.lld >= 15.0.0) and a version of LLVM that does not have
the fixes (the integrated assembler [2] and ld.lld [3] < 18.0.0)
necessary to generate the correct debug info.

Link: https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6 [1]
Link: https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a [2]
Link: https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77 [3]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 arch/riscv/Kconfig | 9 +++++++++
 lib/Kconfig.debug  | 1 +
 2 files changed, 10 insertions(+)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 72be1d8122a3..81b473cb47b0 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -186,6 +186,15 @@ config RISCV_USE_LINKER_RELAXATION
 	# https://github.com/llvm/llvm-project/commit/6611d58f5bbcbec77262d392e2923e1d680f6985
 	depends on !LD_IS_LLD || LLD_VERSION >= 150000
 
+# https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6
+config ARCH_HAS_BROKEN_DWARF5
+	def_bool y
+	depends on RISCV_USE_LINKER_RELAXATION
+	# https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a
+	depends on AS_IS_LLVM && AS_VERSION < 180000
+	# https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77
+	depends on LD_IS_LLD && LLD_VERSION < 180000
+
 config ARCH_MMAP_RND_BITS_MIN
 	default 18 if 64BIT
 	default 8
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index cc7d53d9dc01..a0ebce05a368 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -282,6 +282,7 @@ config DEBUG_INFO_DWARF4
 config DEBUG_INFO_DWARF5
 	bool "Generate DWARF Version 5 debuginfo"
 	select DEBUG_INFO
+	depends on !ARCH_HAS_BROKEN_DWARF5
 	depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_LEB128)
 	help
 	  Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 2/3] riscv: Restrict DWARF5 when building with LLVM to known working versions
@ 2023-12-05 23:53   ` Nathan Chancellor
  0 siblings, 0 replies; 16+ messages in thread
From: Nathan Chancellor @ 2023-12-05 23:53 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, conor
  Cc: maskray, ndesaulniers, linux-riscv, llvm, patches, Nathan Chancellor

LLVM prior to 18.0.0 would generate incorrect debug info for DWARF5 due
to linker relaxation, which was worked around in clang by defaulting
RISC-V to DWARF4 [1]. Unfortunately, this workaround does not work for
the kernel because the DWARF version can be independently changed from
the default in Kconfig.

Do not allow DWARF5 to be selected for RISC-V when using linker
relaxation (ld.lld >= 15.0.0) and a version of LLVM that does not have
the fixes (the integrated assembler [2] and ld.lld [3] < 18.0.0)
necessary to generate the correct debug info.

Link: https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6 [1]
Link: https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a [2]
Link: https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77 [3]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 arch/riscv/Kconfig | 9 +++++++++
 lib/Kconfig.debug  | 1 +
 2 files changed, 10 insertions(+)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 72be1d8122a3..81b473cb47b0 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -186,6 +186,15 @@ config RISCV_USE_LINKER_RELAXATION
 	# https://github.com/llvm/llvm-project/commit/6611d58f5bbcbec77262d392e2923e1d680f6985
 	depends on !LD_IS_LLD || LLD_VERSION >= 150000
 
+# https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6
+config ARCH_HAS_BROKEN_DWARF5
+	def_bool y
+	depends on RISCV_USE_LINKER_RELAXATION
+	# https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a
+	depends on AS_IS_LLVM && AS_VERSION < 180000
+	# https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77
+	depends on LD_IS_LLD && LLD_VERSION < 180000
+
 config ARCH_MMAP_RND_BITS_MIN
 	default 18 if 64BIT
 	default 8
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index cc7d53d9dc01..a0ebce05a368 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -282,6 +282,7 @@ config DEBUG_INFO_DWARF4
 config DEBUG_INFO_DWARF5
 	bool "Generate DWARF Version 5 debuginfo"
 	select DEBUG_INFO
+	depends on !ARCH_HAS_BROKEN_DWARF5
 	depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_LEB128)
 	help
 	  Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc

-- 
2.43.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 3/3] lib/Kconfig.debug: Update AS_HAS_NON_CONST_LEB128 comment and name
  2023-12-05 23:53 ` Nathan Chancellor
@ 2023-12-05 23:53   ` Nathan Chancellor
  -1 siblings, 0 replies; 16+ messages in thread
From: Nathan Chancellor @ 2023-12-05 23:53 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, conor
  Cc: maskray, ndesaulniers, linux-riscv, llvm, patches, Nathan Chancellor

Fangrui noted that the comment around CONFIG_AS_HAS_NON_CONST_LEB128
could be made more accurate because explicit .sleb128 directives are not
emitted, only .uleb128 directives are. Rename the symbol to
CONFIG_AS_HAS_NON_CONST_ULEB128 as a result.

Further clarifications include replacing "symbol deltas" with the more
accurate "label differences", noting that this issue has been resolved
in newer binutils (2.41+), and it only occurs when a port uses RISC-V
style linker relaxation.

Suggested-by: Fangrui Song <maskray@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 lib/Kconfig.debug | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index a0ebce05a368..76c2cc697573 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -231,9 +231,10 @@ config DEBUG_INFO
 	  in the "Debug information" choice below, indicating that debug
 	  information will be generated for build targets.
 
-# Clang is known to generate .{s,u}leb128 with symbol deltas with DWARF5, which
-# some targets may not support: https://sourceware.org/bugzilla/show_bug.cgi?id=27215
-config AS_HAS_NON_CONST_LEB128
+# Clang generates .uleb128 with label differences for DWARF v5, a feature that
+# older binutils ports do not support when utilizing RISC-V style linker
+# relaxation: https://sourceware.org/bugzilla/show_bug.cgi?id=27215
+config AS_HAS_NON_CONST_ULEB128
 	def_bool $(as-instr,.uleb128 .Lexpr_end4 - .Lexpr_start3\n.Lexpr_start3:\n.Lexpr_end4:)
 
 choice
@@ -258,7 +259,7 @@ config DEBUG_INFO_NONE
 config DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
 	bool "Rely on the toolchain's implicit default DWARF version"
 	select DEBUG_INFO
-	depends on !CC_IS_CLANG || AS_IS_LLVM || CLANG_VERSION < 140000 || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_LEB128)
+	depends on !CC_IS_CLANG || AS_IS_LLVM || CLANG_VERSION < 140000 || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_ULEB128)
 	help
 	  The implicit default version of DWARF debug info produced by a
 	  toolchain changes over time.
@@ -283,7 +284,7 @@ config DEBUG_INFO_DWARF5
 	bool "Generate DWARF Version 5 debuginfo"
 	select DEBUG_INFO
 	depends on !ARCH_HAS_BROKEN_DWARF5
-	depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_LEB128)
+	depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_ULEB128)
 	help
 	  Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc
 	  5.0+ accepts the -gdwarf-5 flag but only had partial support for some

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 3/3] lib/Kconfig.debug: Update AS_HAS_NON_CONST_LEB128 comment and name
@ 2023-12-05 23:53   ` Nathan Chancellor
  0 siblings, 0 replies; 16+ messages in thread
From: Nathan Chancellor @ 2023-12-05 23:53 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, conor
  Cc: maskray, ndesaulniers, linux-riscv, llvm, patches, Nathan Chancellor

Fangrui noted that the comment around CONFIG_AS_HAS_NON_CONST_LEB128
could be made more accurate because explicit .sleb128 directives are not
emitted, only .uleb128 directives are. Rename the symbol to
CONFIG_AS_HAS_NON_CONST_ULEB128 as a result.

Further clarifications include replacing "symbol deltas" with the more
accurate "label differences", noting that this issue has been resolved
in newer binutils (2.41+), and it only occurs when a port uses RISC-V
style linker relaxation.

Suggested-by: Fangrui Song <maskray@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 lib/Kconfig.debug | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index a0ebce05a368..76c2cc697573 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -231,9 +231,10 @@ config DEBUG_INFO
 	  in the "Debug information" choice below, indicating that debug
 	  information will be generated for build targets.
 
-# Clang is known to generate .{s,u}leb128 with symbol deltas with DWARF5, which
-# some targets may not support: https://sourceware.org/bugzilla/show_bug.cgi?id=27215
-config AS_HAS_NON_CONST_LEB128
+# Clang generates .uleb128 with label differences for DWARF v5, a feature that
+# older binutils ports do not support when utilizing RISC-V style linker
+# relaxation: https://sourceware.org/bugzilla/show_bug.cgi?id=27215
+config AS_HAS_NON_CONST_ULEB128
 	def_bool $(as-instr,.uleb128 .Lexpr_end4 - .Lexpr_start3\n.Lexpr_start3:\n.Lexpr_end4:)
 
 choice
@@ -258,7 +259,7 @@ config DEBUG_INFO_NONE
 config DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
 	bool "Rely on the toolchain's implicit default DWARF version"
 	select DEBUG_INFO
-	depends on !CC_IS_CLANG || AS_IS_LLVM || CLANG_VERSION < 140000 || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_LEB128)
+	depends on !CC_IS_CLANG || AS_IS_LLVM || CLANG_VERSION < 140000 || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_ULEB128)
 	help
 	  The implicit default version of DWARF debug info produced by a
 	  toolchain changes over time.
@@ -283,7 +284,7 @@ config DEBUG_INFO_DWARF5
 	bool "Generate DWARF Version 5 debuginfo"
 	select DEBUG_INFO
 	depends on !ARCH_HAS_BROKEN_DWARF5
-	depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_LEB128)
+	depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_ULEB128)
 	help
 	  Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc
 	  5.0+ accepts the -gdwarf-5 flag but only had partial support for some

-- 
2.43.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 2/3] riscv: Restrict DWARF5 when building with LLVM to known working versions
  2023-12-05 23:53   ` Nathan Chancellor
@ 2023-12-06  2:11     ` Fangrui Song
  -1 siblings, 0 replies; 16+ messages in thread
From: Fangrui Song @ 2023-12-06  2:11 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: paul.walmsley, palmer, aou, conor, ndesaulniers, linux-riscv,
	llvm, patches

On Tue, Dec 5, 2023 at 3:54 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> LLVM prior to 18.0.0 would generate incorrect debug info for DWARF5 due
> to linker relaxation, which was worked around in clang by defaulting
> RISC-V to DWARF4 [1]. Unfortunately, this workaround does not work for
> the kernel because the DWARF version can be independently changed from
> the default in Kconfig.
>
> Do not allow DWARF5 to be selected for RISC-V when using linker
> relaxation (ld.lld >= 15.0.0) and a version of LLVM that does not have
> the fixes (the integrated assembler [2] and ld.lld [3] < 18.0.0)
> necessary to generate the correct debug info.
>
> Link: https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6 [1]
> Link: https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a [2]
> Link: https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77 [3]
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>  arch/riscv/Kconfig | 9 +++++++++
>  lib/Kconfig.debug  | 1 +
>  2 files changed, 10 insertions(+)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 72be1d8122a3..81b473cb47b0 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -186,6 +186,15 @@ config RISCV_USE_LINKER_RELAXATION
>         # https://github.com/llvm/llvm-project/commit/6611d58f5bbcbec77262d392e2923e1d680f6985
>         depends on !LD_IS_LLD || LLD_VERSION >= 150000
>
> +# https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6
> +config ARCH_HAS_BROKEN_DWARF5
> +       def_bool y
> +       depends on RISCV_USE_LINKER_RELAXATION
> +       # https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a
> +       depends on AS_IS_LLVM && AS_VERSION < 180000
> +       # https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77
> +       depends on LD_IS_LLD && LLD_VERSION < 180000
> +

LGTM.  loongarch folks can add arch/loongarch/Kconfig after they
finish their R_LARCH_ADD_ULEB128/R_LARCH_SUB_ULEB128 toolchain work.

Reviewed-by: Fangrui Song <maskray@google.com>

>  config ARCH_MMAP_RND_BITS_MIN
>         default 18 if 64BIT
>         default 8
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index cc7d53d9dc01..a0ebce05a368 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -282,6 +282,7 @@ config DEBUG_INFO_DWARF4
>  config DEBUG_INFO_DWARF5
>         bool "Generate DWARF Version 5 debuginfo"
>         select DEBUG_INFO
> +       depends on !ARCH_HAS_BROKEN_DWARF5
>         depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_LEB128)
>         help
>           Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc
>
> --
> 2.43.0
>
>


-- 
宋方睿

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 2/3] riscv: Restrict DWARF5 when building with LLVM to known working versions
@ 2023-12-06  2:11     ` Fangrui Song
  0 siblings, 0 replies; 16+ messages in thread
From: Fangrui Song @ 2023-12-06  2:11 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: paul.walmsley, palmer, aou, conor, ndesaulniers, linux-riscv,
	llvm, patches

On Tue, Dec 5, 2023 at 3:54 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> LLVM prior to 18.0.0 would generate incorrect debug info for DWARF5 due
> to linker relaxation, which was worked around in clang by defaulting
> RISC-V to DWARF4 [1]. Unfortunately, this workaround does not work for
> the kernel because the DWARF version can be independently changed from
> the default in Kconfig.
>
> Do not allow DWARF5 to be selected for RISC-V when using linker
> relaxation (ld.lld >= 15.0.0) and a version of LLVM that does not have
> the fixes (the integrated assembler [2] and ld.lld [3] < 18.0.0)
> necessary to generate the correct debug info.
>
> Link: https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6 [1]
> Link: https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a [2]
> Link: https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77 [3]
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>  arch/riscv/Kconfig | 9 +++++++++
>  lib/Kconfig.debug  | 1 +
>  2 files changed, 10 insertions(+)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 72be1d8122a3..81b473cb47b0 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -186,6 +186,15 @@ config RISCV_USE_LINKER_RELAXATION
>         # https://github.com/llvm/llvm-project/commit/6611d58f5bbcbec77262d392e2923e1d680f6985
>         depends on !LD_IS_LLD || LLD_VERSION >= 150000
>
> +# https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6
> +config ARCH_HAS_BROKEN_DWARF5
> +       def_bool y
> +       depends on RISCV_USE_LINKER_RELAXATION
> +       # https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a
> +       depends on AS_IS_LLVM && AS_VERSION < 180000
> +       # https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77
> +       depends on LD_IS_LLD && LLD_VERSION < 180000
> +

LGTM.  loongarch folks can add arch/loongarch/Kconfig after they
finish their R_LARCH_ADD_ULEB128/R_LARCH_SUB_ULEB128 toolchain work.

Reviewed-by: Fangrui Song <maskray@google.com>

>  config ARCH_MMAP_RND_BITS_MIN
>         default 18 if 64BIT
>         default 8
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index cc7d53d9dc01..a0ebce05a368 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -282,6 +282,7 @@ config DEBUG_INFO_DWARF4
>  config DEBUG_INFO_DWARF5
>         bool "Generate DWARF Version 5 debuginfo"
>         select DEBUG_INFO
> +       depends on !ARCH_HAS_BROKEN_DWARF5
>         depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_LEB128)
>         help
>           Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc
>
> --
> 2.43.0
>
>


-- 
宋方睿

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 3/3] lib/Kconfig.debug: Update AS_HAS_NON_CONST_LEB128 comment and name
  2023-12-05 23:53   ` Nathan Chancellor
@ 2023-12-14  0:12     ` Charlie Jenkins
  -1 siblings, 0 replies; 16+ messages in thread
From: Charlie Jenkins @ 2023-12-14  0:12 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: paul.walmsley, palmer, aou, conor, maskray, ndesaulniers,
	linux-riscv, llvm, patches

On Tue, Dec 05, 2023 at 04:53:52PM -0700, Nathan Chancellor wrote:
> Fangrui noted that the comment around CONFIG_AS_HAS_NON_CONST_LEB128
> could be made more accurate because explicit .sleb128 directives are not
> emitted, only .uleb128 directives are. Rename the symbol to
> CONFIG_AS_HAS_NON_CONST_ULEB128 as a result.
> 
> Further clarifications include replacing "symbol deltas" with the more
> accurate "label differences", noting that this issue has been resolved
> in newer binutils (2.41+), and it only occurs when a port uses RISC-V
> style linker relaxation.
> 
> Suggested-by: Fangrui Song <maskray@google.com>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>  lib/Kconfig.debug | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index a0ebce05a368..76c2cc697573 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -231,9 +231,10 @@ config DEBUG_INFO
>  	  in the "Debug information" choice below, indicating that debug
>  	  information will be generated for build targets.
>  
> -# Clang is known to generate .{s,u}leb128 with symbol deltas with DWARF5, which
> -# some targets may not support: https://sourceware.org/bugzilla/show_bug.cgi?id=27215
> -config AS_HAS_NON_CONST_LEB128
> +# Clang generates .uleb128 with label differences for DWARF v5, a feature that
> +# older binutils ports do not support when utilizing RISC-V style linker
> +# relaxation: https://sourceware.org/bugzilla/show_bug.cgi?id=27215
> +config AS_HAS_NON_CONST_ULEB128
>  	def_bool $(as-instr,.uleb128 .Lexpr_end4 - .Lexpr_start3\n.Lexpr_start3:\n.Lexpr_end4:)

This seems like a good change. However the wording in your commit
message seems misleading. This config only ever checked for .uleb128
with a label difference and would assume that sleb128 with label
differences were supported. This seems more like a "bug" in the config
name that this is fixing. My interpretation is that your commit
describes why this issue was never caught (because sleb128 is not
emitted), but not the root of why this change is necessary (because
non-const sleb128 is not necessarily supported if non-const uleb128 is).
Anyways, it's just a commit message so not something that is important
to change.

Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>

>  
>  choice
> @@ -258,7 +259,7 @@ config DEBUG_INFO_NONE
>  config DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
>  	bool "Rely on the toolchain's implicit default DWARF version"
>  	select DEBUG_INFO
> -	depends on !CC_IS_CLANG || AS_IS_LLVM || CLANG_VERSION < 140000 || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_LEB128)
> +	depends on !CC_IS_CLANG || AS_IS_LLVM || CLANG_VERSION < 140000 || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_ULEB128)
>  	help
>  	  The implicit default version of DWARF debug info produced by a
>  	  toolchain changes over time.
> @@ -283,7 +284,7 @@ config DEBUG_INFO_DWARF5
>  	bool "Generate DWARF Version 5 debuginfo"
>  	select DEBUG_INFO
>  	depends on !ARCH_HAS_BROKEN_DWARF5
> -	depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_LEB128)
> +	depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_ULEB128)
>  	help
>  	  Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc
>  	  5.0+ accepts the -gdwarf-5 flag but only had partial support for some
> 
> -- 
> 2.43.0
> 
> 
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 3/3] lib/Kconfig.debug: Update AS_HAS_NON_CONST_LEB128 comment and name
@ 2023-12-14  0:12     ` Charlie Jenkins
  0 siblings, 0 replies; 16+ messages in thread
From: Charlie Jenkins @ 2023-12-14  0:12 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: paul.walmsley, palmer, aou, conor, maskray, ndesaulniers,
	linux-riscv, llvm, patches

On Tue, Dec 05, 2023 at 04:53:52PM -0700, Nathan Chancellor wrote:
> Fangrui noted that the comment around CONFIG_AS_HAS_NON_CONST_LEB128
> could be made more accurate because explicit .sleb128 directives are not
> emitted, only .uleb128 directives are. Rename the symbol to
> CONFIG_AS_HAS_NON_CONST_ULEB128 as a result.
> 
> Further clarifications include replacing "symbol deltas" with the more
> accurate "label differences", noting that this issue has been resolved
> in newer binutils (2.41+), and it only occurs when a port uses RISC-V
> style linker relaxation.
> 
> Suggested-by: Fangrui Song <maskray@google.com>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>  lib/Kconfig.debug | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index a0ebce05a368..76c2cc697573 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -231,9 +231,10 @@ config DEBUG_INFO
>  	  in the "Debug information" choice below, indicating that debug
>  	  information will be generated for build targets.
>  
> -# Clang is known to generate .{s,u}leb128 with symbol deltas with DWARF5, which
> -# some targets may not support: https://sourceware.org/bugzilla/show_bug.cgi?id=27215
> -config AS_HAS_NON_CONST_LEB128
> +# Clang generates .uleb128 with label differences for DWARF v5, a feature that
> +# older binutils ports do not support when utilizing RISC-V style linker
> +# relaxation: https://sourceware.org/bugzilla/show_bug.cgi?id=27215
> +config AS_HAS_NON_CONST_ULEB128
>  	def_bool $(as-instr,.uleb128 .Lexpr_end4 - .Lexpr_start3\n.Lexpr_start3:\n.Lexpr_end4:)

This seems like a good change. However the wording in your commit
message seems misleading. This config only ever checked for .uleb128
with a label difference and would assume that sleb128 with label
differences were supported. This seems more like a "bug" in the config
name that this is fixing. My interpretation is that your commit
describes why this issue was never caught (because sleb128 is not
emitted), but not the root of why this change is necessary (because
non-const sleb128 is not necessarily supported if non-const uleb128 is).
Anyways, it's just a commit message so not something that is important
to change.

Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>

>  
>  choice
> @@ -258,7 +259,7 @@ config DEBUG_INFO_NONE
>  config DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
>  	bool "Rely on the toolchain's implicit default DWARF version"
>  	select DEBUG_INFO
> -	depends on !CC_IS_CLANG || AS_IS_LLVM || CLANG_VERSION < 140000 || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_LEB128)
> +	depends on !CC_IS_CLANG || AS_IS_LLVM || CLANG_VERSION < 140000 || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_ULEB128)
>  	help
>  	  The implicit default version of DWARF debug info produced by a
>  	  toolchain changes over time.
> @@ -283,7 +284,7 @@ config DEBUG_INFO_DWARF5
>  	bool "Generate DWARF Version 5 debuginfo"
>  	select DEBUG_INFO
>  	depends on !ARCH_HAS_BROKEN_DWARF5
> -	depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_LEB128)
> +	depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_ULEB128)
>  	help
>  	  Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc
>  	  5.0+ accepts the -gdwarf-5 flag but only had partial support for some
> 
> -- 
> 2.43.0
> 
> 
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 0/3] RISC-V: Disable DWARF5 with known broken LLVM versions
  2023-12-05 23:53 ` Nathan Chancellor
@ 2024-01-18  2:11   ` Palmer Dabbelt
  -1 siblings, 0 replies; 16+ messages in thread
From: Palmer Dabbelt @ 2024-01-18  2:11 UTC (permalink / raw)
  To: nathan
  Cc: Paul Walmsley, aou, Conor Dooley, maskray, ndesaulniers,
	linux-riscv, llvm, patches, nathan

On Tue, 05 Dec 2023 15:53:49 PST (-0800), nathan@kernel.org wrote:
> Hi all,
>
> This series disables DWARF5 for LLVM versions where it is known to be
> broken due to linker relaxation:
>
> https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6
>
> If I understand correctly, it sounds like GNU binutils has a similar
> issue but I am not sure of the status of the fixes and such, so I did
> not bother with checking for it but it should be easy to add if so
> desired.

Do you have any more info?  All I know is this add/sub/set mess we've 
got, but that's a cross linking problem.

I queued this up for testing, should show up on for-next soon.  Thanks!

> ---
> Changes in v2:
> - Added patch 3 with Fangrui's suggested improvements around
>   CONFIG_AS_HAS_NON_CONST_LEB128.
> - Pick up Fangrui's Reviewed-by on patch 1.
> - Link to v1: https://lore.kernel.org/r/20231129-riscv-restrict-dwarf5-llvm-v1-0-ec0d368fb538@kernel.org
>
> ---
> Nathan Chancellor (3):
>       riscv: Hoist linker relaxation disabling logic into Kconfig
>       riscv: Restrict DWARF5 when building with LLVM to known working versions
>       lib/Kconfig.debug: Update AS_HAS_NON_CONST_LEB128 comment and name
>
>  arch/riscv/Kconfig  | 14 ++++++++++++++
>  arch/riscv/Makefile |  4 +---
>  lib/Kconfig.debug   | 12 +++++++-----
>  3 files changed, 22 insertions(+), 8 deletions(-)
> ---
> base-commit: 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab
> change-id: 20231129-riscv-restrict-dwarf5-llvm-a9824bb974cb
>
> Best regards,

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 0/3] RISC-V: Disable DWARF5 with known broken LLVM versions
@ 2024-01-18  2:11   ` Palmer Dabbelt
  0 siblings, 0 replies; 16+ messages in thread
From: Palmer Dabbelt @ 2024-01-18  2:11 UTC (permalink / raw)
  To: nathan
  Cc: Paul Walmsley, aou, Conor Dooley, maskray, ndesaulniers,
	linux-riscv, llvm, patches, nathan

On Tue, 05 Dec 2023 15:53:49 PST (-0800), nathan@kernel.org wrote:
> Hi all,
>
> This series disables DWARF5 for LLVM versions where it is known to be
> broken due to linker relaxation:
>
> https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6
>
> If I understand correctly, it sounds like GNU binutils has a similar
> issue but I am not sure of the status of the fixes and such, so I did
> not bother with checking for it but it should be easy to add if so
> desired.

Do you have any more info?  All I know is this add/sub/set mess we've 
got, but that's a cross linking problem.

I queued this up for testing, should show up on for-next soon.  Thanks!

> ---
> Changes in v2:
> - Added patch 3 with Fangrui's suggested improvements around
>   CONFIG_AS_HAS_NON_CONST_LEB128.
> - Pick up Fangrui's Reviewed-by on patch 1.
> - Link to v1: https://lore.kernel.org/r/20231129-riscv-restrict-dwarf5-llvm-v1-0-ec0d368fb538@kernel.org
>
> ---
> Nathan Chancellor (3):
>       riscv: Hoist linker relaxation disabling logic into Kconfig
>       riscv: Restrict DWARF5 when building with LLVM to known working versions
>       lib/Kconfig.debug: Update AS_HAS_NON_CONST_LEB128 comment and name
>
>  arch/riscv/Kconfig  | 14 ++++++++++++++
>  arch/riscv/Makefile |  4 +---
>  lib/Kconfig.debug   | 12 +++++++-----
>  3 files changed, 22 insertions(+), 8 deletions(-)
> ---
> base-commit: 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab
> change-id: 20231129-riscv-restrict-dwarf5-llvm-a9824bb974cb
>
> Best regards,

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 0/3] RISC-V: Disable DWARF5 with known broken LLVM versions
  2023-12-05 23:53 ` Nathan Chancellor
@ 2024-01-20 21:09   ` patchwork-bot+linux-riscv
  -1 siblings, 0 replies; 16+ messages in thread
From: patchwork-bot+linux-riscv @ 2024-01-20 21:09 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: linux-riscv, paul.walmsley, palmer, aou, conor, maskray,
	ndesaulniers, llvm, patches

Hello:

This series was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Tue, 05 Dec 2023 16:53:49 -0700 you wrote:
> Hi all,
> 
> This series disables DWARF5 for LLVM versions where it is known to be
> broken due to linker relaxation:
> 
> https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6
> 
> [...]

Here is the summary with links:
  - [v2,1/3] riscv: Hoist linker relaxation disabling logic into Kconfig
    https://git.kernel.org/riscv/c/55b71d2ce133
  - [v2,2/3] riscv: Restrict DWARF5 when building with LLVM to known working versions
    https://git.kernel.org/riscv/c/ae84ff9a14a5
  - [v2,3/3] lib/Kconfig.debug: Update AS_HAS_NON_CONST_LEB128 comment and name
    https://git.kernel.org/riscv/c/a4426641f00c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 0/3] RISC-V: Disable DWARF5 with known broken LLVM versions
@ 2024-01-20 21:09   ` patchwork-bot+linux-riscv
  0 siblings, 0 replies; 16+ messages in thread
From: patchwork-bot+linux-riscv @ 2024-01-20 21:09 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: linux-riscv, paul.walmsley, palmer, aou, conor, maskray,
	ndesaulniers, llvm, patches

Hello:

This series was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Tue, 05 Dec 2023 16:53:49 -0700 you wrote:
> Hi all,
> 
> This series disables DWARF5 for LLVM versions where it is known to be
> broken due to linker relaxation:
> 
> https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6
> 
> [...]

Here is the summary with links:
  - [v2,1/3] riscv: Hoist linker relaxation disabling logic into Kconfig
    https://git.kernel.org/riscv/c/55b71d2ce133
  - [v2,2/3] riscv: Restrict DWARF5 when building with LLVM to known working versions
    https://git.kernel.org/riscv/c/ae84ff9a14a5
  - [v2,3/3] lib/Kconfig.debug: Update AS_HAS_NON_CONST_LEB128 comment and name
    https://git.kernel.org/riscv/c/a4426641f00c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-01-20 22:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05 23:53 [PATCH v2 0/3] RISC-V: Disable DWARF5 with known broken LLVM versions Nathan Chancellor
2023-12-05 23:53 ` Nathan Chancellor
2023-12-05 23:53 ` [PATCH v2 1/3] riscv: Hoist linker relaxation disabling logic into Kconfig Nathan Chancellor
2023-12-05 23:53   ` Nathan Chancellor
2023-12-05 23:53 ` [PATCH v2 2/3] riscv: Restrict DWARF5 when building with LLVM to known working versions Nathan Chancellor
2023-12-05 23:53   ` Nathan Chancellor
2023-12-06  2:11   ` Fangrui Song
2023-12-06  2:11     ` Fangrui Song
2023-12-05 23:53 ` [PATCH v2 3/3] lib/Kconfig.debug: Update AS_HAS_NON_CONST_LEB128 comment and name Nathan Chancellor
2023-12-05 23:53   ` Nathan Chancellor
2023-12-14  0:12   ` Charlie Jenkins
2023-12-14  0:12     ` Charlie Jenkins
2024-01-18  2:11 ` [PATCH v2 0/3] RISC-V: Disable DWARF5 with known broken LLVM versions Palmer Dabbelt
2024-01-18  2:11   ` Palmer Dabbelt
2024-01-20 21:09 ` patchwork-bot+linux-riscv
2024-01-20 21:09   ` patchwork-bot+linux-riscv

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.