]> err.no Git - linux-2.6/commitdiff
kbuild: pass -g to assembler under CONFIG_DEBUG_INFO
authorRoland McGrath <roland@redhat.com>
Fri, 28 Sep 2007 18:51:58 +0000 (20:51 +0200)
committerSam Ravnborg <sam@neptun.(none)>
Fri, 12 Oct 2007 19:20:32 +0000 (21:20 +0200)
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>
Makefile

index 1b0d84d4961281acacbcd85caec8180878c97f3e..0ad6e8d9b0b3a04ed3d087bf3edd70fa5298146d 100644 (file)
--- 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