Skip to content

Commit cf851aa

Browse files
Roland McGrathSam Ravnborg
authored andcommitted
kbuild: pass -g to assembler under CONFIG_DEBUG_INFO
The assembler for a while now supports -gdwarf to generate source line info just like the C compiler does. Source-level assembly debugging sounds like an oxymoron, but it is handy to be able to see the right source file and read its comments rather than just the disassembly. This patch enables -gdwarf for assembly files when CONFIG_DEBUG_INFO=y and the assembler supports the option. Signed-off-by: Roland McGrath <roland@redhat.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
1 parent 14f3156 commit cf851aa

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ endif
502502

503503
ifdef CONFIG_DEBUG_INFO
504504
CFLAGS += -g
505+
AFLAGS += -gdwarf-2
505506
endif
506507

507508
# Force gcc to behave correct even for buggy distributions

0 commit comments

Comments
 (0)