Skip to content

Commit

Permalink
kbuild: Fix debugging info generation for .S files
Browse files Browse the repository at this point in the history
Change the debuging info generation flag in KBUILD_AFLAGS from '-gdwarf-2' to
'-Wa,--gdwarf-2'.  This will properly generate the debugging info for .S files
when CONFIG_DEBUG_INFO=y.

It seems current gcc does not pass a '--gdwarf-2' option on to the assembler
when '-gdwarf-2' is on its command line (note the differece in the gcc and as
flags).  This change provides the correct assembler flag to gcc, and so does
not rely on gcc to emit a flag for the assembler.

Signed-off-by: Geoff Levand <[email protected]> for Huawei, Linaro
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
glevand authored and michal42 committed Jan 27, 2014
1 parent 9df62f0 commit 7db4363
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ endif

ifdef CONFIG_DEBUG_INFO
KBUILD_CFLAGS += -g
KBUILD_AFLAGS += -gdwarf-2
KBUILD_AFLAGS += -Wa,--gdwarf-2
endif

ifdef CONFIG_DEBUG_INFO_REDUCED
Expand Down

0 comments on commit 7db4363

Please sign in to comment.