Commit b8a90923 authored by Nick Desaulniers's avatar Nick Desaulniers Committed by Masahiro Yamada

Kbuild: do not emit debug info for assembly with LLVM_IAS=1

Clang's integrated assembler produces the warning for assembly files:

warning: DWARF2 only supports one section per compilation unit

If -Wa,-gdwarf-* is unspecified, then debug info is not emitted for
assembly sources (it is still emitted for C sources).  This will be
re-enabled for newer DWARF versions in a follow up patch.

Enables defconfig+CONFIG_DEBUG_INFO to build cleanly with
LLVM=1 LLVM_IAS=1 for x86_64 and arm64.

Cc: <stable@vger.kernel.org>
Link: https://github.com/ClangBuiltLinux/linux/issues/716Reported-by: default avatarDmitry Golovin <dima@golovin.in>
Reported-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Suggested-by: default avatarDmitry Golovin <dima@golovin.in>
Suggested-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Suggested-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
Reviewed-by: default avatarFangrui Song <maskray@google.com>
Reviewed-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent a716bd74
...@@ -828,7 +828,9 @@ else ...@@ -828,7 +828,9 @@ else
DEBUG_CFLAGS += -g DEBUG_CFLAGS += -g
endif endif
ifneq ($(LLVM_IAS),1)
KBUILD_AFLAGS += -Wa,-gdwarf-2 KBUILD_AFLAGS += -Wa,-gdwarf-2
endif
ifdef CONFIG_DEBUG_INFO_DWARF4 ifdef CONFIG_DEBUG_INFO_DWARF4
DEBUG_CFLAGS += -gdwarf-4 DEBUG_CFLAGS += -gdwarf-4
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment