Skip to content

Commit 2e98815

Browse files
committed
kbuild: dwarf: use AS_VERSION instead of test_dwarf5_support.sh
The test code in scripts/test_dwarf5_support.sh is somewhat difficult to understand, but after all, we want to check binutils >= 2.35.2 From the former discussion, the requirement for generating DWARF v5 from C code is as follows: - gcc + gnu as -> requires gcc 5.0+ (but 7.0+ for full support) - clang + gnu as -> requires binutils 2.35.2+ - clang + integrated as -> OK Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]>
1 parent ba64beb commit 2e98815

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

lib/Kconfig.debug

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,7 @@ config DEBUG_INFO_DWARF4
284284

285285
config DEBUG_INFO_DWARF5
286286
bool "Generate DWARF Version 5 debuginfo"
287-
depends on GCC_VERSION >= 50000 || CC_IS_CLANG
288-
depends on CC_IS_GCC || $(success,$(srctree)/scripts/test_dwarf5_support.sh $(CC) $(CLANG_FLAGS))
287+
depends on GCC_VERSION >= 50000 || (CC_IS_CLANG && (AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502)))
289288
depends on !DEBUG_INFO_BTF
290289
help
291290
Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc

scripts/test_dwarf5_support.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)