From: Roland McGrath Date: Fri, 28 Sep 2007 18:51:58 +0000 (+0200) Subject: kbuild: pass -g to assembler under CONFIG_DEBUG_INFO X-Git-Tag: v2.6.24-rc1~830^2~18 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf851aa75694bdcc27a5092b2e45de6dcdc1cfa8;p=linux-2.6 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 Cc: Sam Ravnborg Cc: Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg --- diff --git a/Makefile b/Makefile index 1b0d84d496..0ad6e8d9b0 100644 --- a/Makefile +++ b/Makefile @@ -502,6 +502,7 @@ endif ifdef CONFIG_DEBUG_INFO CFLAGS += -g +AFLAGS += -gdwarf-2 endif # Force gcc to behave correct even for buggy distributions