* [PATCH 1/3] kbuild: Fix debugging info generation for .S files
2013-12-11 23:34 [PATCH 0/3] Fix debugging info for .S files Geoff Levand
2013-12-11 23:34 ` [PATCH 2/3] frv: Remove redundent debugging info flag Geoff Levand
@ 2013-12-11 23:34 ` Geoff Levand
2014-01-27 21:03 ` Michal Marek
2013-12-11 23:34 ` [PATCH 3/3] mn10300: Remove redundent debugging info flag Geoff Levand
2 siblings, 1 reply; 9+ messages in thread
From: Geoff Levand @ 2013-12-11 23:34 UTC (permalink / raw)
To: Michal Marek; +Cc: linux-kbuild, David Howells
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 <geoff@infradead.org> for Huawei, Linaro
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 890392f..7308a6f 100644
--- a/Makefile
+++ b/Makefile
@@ -619,7 +619,7 @@ endif
ifdef CONFIG_DEBUG_INFO
KBUILD_CFLAGS += -g
-KBUILD_AFLAGS += -gdwarf-2
+KBUILD_AFLAGS += -Wa,--gdwarf-2
endif
ifdef CONFIG_DEBUG_INFO_REDUCED
--
1.8.1.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3] mn10300: Remove redundent debugging info flag
2013-12-11 23:34 [PATCH 0/3] Fix debugging info for .S files Geoff Levand
2013-12-11 23:34 ` [PATCH 2/3] frv: Remove redundent debugging info flag Geoff Levand
2013-12-11 23:34 ` [PATCH 1/3] kbuild: Fix debugging info generation for .S files Geoff Levand
@ 2013-12-11 23:34 ` Geoff Levand
2014-01-27 21:08 ` Michal Marek
2 siblings, 1 reply; 9+ messages in thread
From: Geoff Levand @ 2013-12-11 23:34 UTC (permalink / raw)
To: Michal Marek; +Cc: linux-kbuild, David Howells
The gereric makefile now sets '-Wa,--gdwarf2' in KBUILD_AFLAGS, so
this setting is no longer needed in arch makefiles.
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
---
arch/mn10300/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/mn10300/Makefile b/arch/mn10300/Makefile
index a3d0fef..f5a9db9 100644
--- a/arch/mn10300/Makefile
+++ b/arch/mn10300/Makefile
@@ -97,7 +97,6 @@ endef
# that are unhelpful whilst debugging.
ifdef CONFIG_DEBUG_INFO
#KBUILD_CFLAGS += -O1
-KBUILD_AFLAGS += -Wa,--gdwarf2
endif
#
--
1.8.1.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] frv: Remove redundent debugging info flag
2013-12-11 23:34 [PATCH 0/3] Fix debugging info for .S files Geoff Levand
@ 2013-12-11 23:34 ` Geoff Levand
2014-01-28 1:48 ` [PATCH V2 2/3] frv: Remove redundant " Geoff Levand
2013-12-11 23:34 ` [PATCH 1/3] kbuild: Fix debugging info generation for .S files Geoff Levand
2013-12-11 23:34 ` [PATCH 3/3] mn10300: Remove redundent debugging info flag Geoff Levand
2 siblings, 1 reply; 9+ messages in thread
From: Geoff Levand @ 2013-12-11 23:34 UTC (permalink / raw)
To: Michal Marek; +Cc: linux-kbuild, David Howells
The gereric makefile now sets '-Wa,--gdwarf2' in KBUILD_AFLAGS, so
this setting is no longer needed in arch makefiles.
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
---
arch/frv/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/frv/Makefile b/arch/frv/Makefile
index 4d1b1e9..5b838db 100644
--- a/arch/frv/Makefile
+++ b/arch/frv/Makefile
@@ -78,7 +78,6 @@ KBUILD_AFLAGS += -mno-fdpic
# and disable optimisations that are unhelpful whilst debugging
ifdef CONFIG_DEBUG_INFO
#KBUILD_CFLAGS += -O1
-KBUILD_AFLAGS += -Wa,--gdwarf2
endif
head-y := arch/frv/kernel/head.o
--
1.8.1.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 0/3] Fix debugging info for .S files
@ 2013-12-11 23:34 Geoff Levand
2013-12-11 23:34 ` [PATCH 2/3] frv: Remove redundent debugging info flag Geoff Levand
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Geoff Levand @ 2013-12-11 23:34 UTC (permalink / raw)
To: Michal Marek; +Cc: linux-kbuild, David Howells
Hi Michal,
Here are a few small patches to fixup debug info gereration for .S files. I
tested the generated vmlinux with the ARM Fast Model debugger and ARM64 target.
Please apply.
-Geoff
The following changes since commit 374b105797c3d4f29c685f3be535c35f5689b30e:
Linux 3.13-rc3 (2013-12-06 09:34:04 -0800)
are available in the git repository at:
git://git.linaro.org/people/geoff.levand/linux-kexec.git for-kbuild
for you to fetch changes up to e9d530c5b8b1c9a8510d9c8db8663aedc393de8f:
mn10300: Remove redundent debugging info flag (2013-12-11 15:15:00 -0800)
----------------------------------------------------------------
Geoff Levand (3):
kbuild: Fix debugging info generation for .S files
frv: Remove redundent debugging info flag
mn10300: Remove redundent debugging info flag
Makefile | 2 +-
arch/frv/Makefile | 1 -
arch/mn10300/Makefile | 1 -
3 files changed, 1 insertion(+), 3 deletions(-)
--
1.8.1.2
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] kbuild: Fix debugging info generation for .S files
2013-12-11 23:34 ` [PATCH 1/3] kbuild: Fix debugging info generation for .S files Geoff Levand
@ 2014-01-27 21:03 ` Michal Marek
0 siblings, 0 replies; 9+ messages in thread
From: Michal Marek @ 2014-01-27 21:03 UTC (permalink / raw)
To: Geoff Levand; +Cc: linux-kbuild, David Howells
Dne 12.12.2013 00:34, Geoff Levand napsal(a):
> 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 <geoff@infradead.org> for Huawei, Linaro
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to kbuild.git#kbuild, sorry for the delay.
Michal
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] mn10300: Remove redundent debugging info flag
2013-12-11 23:34 ` [PATCH 3/3] mn10300: Remove redundent debugging info flag Geoff Levand
@ 2014-01-27 21:08 ` Michal Marek
2014-01-28 1:48 ` [PATCH V2 3/3] mn10300: Remove redundant " Geoff Levand
0 siblings, 1 reply; 9+ messages in thread
From: Michal Marek @ 2014-01-27 21:08 UTC (permalink / raw)
To: Geoff Levand; +Cc: linux-kbuild, David Howells
Dne 12.12.2013 00:34, Geoff Levand napsal(a):
> The gereric makefile now sets '-Wa,--gdwarf2' in KBUILD_AFLAGS, so
> this setting is no longer needed in arch makefiles.
>
> Cc: David Howells <dhowells@redhat.com>
> Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
> ---
> arch/mn10300/Makefile | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/mn10300/Makefile b/arch/mn10300/Makefile
> index a3d0fef..f5a9db9 100644
> --- a/arch/mn10300/Makefile
> +++ b/arch/mn10300/Makefile
> @@ -97,7 +97,6 @@ endef
> # that are unhelpful whilst debugging.
> ifdef CONFIG_DEBUG_INFO
> #KBUILD_CFLAGS += -O1
> -KBUILD_AFLAGS += -Wa,--gdwarf2
> endif
This leaves only a commented-out assignment in the ifdef block. Just
remove it completely together with the outdated comment above. Same for
the frv Makefile.
Michal
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH V2 2/3] frv: Remove redundant debugging info flag
2013-12-11 23:34 ` [PATCH 2/3] frv: Remove redundent debugging info flag Geoff Levand
@ 2014-01-28 1:48 ` Geoff Levand
2014-01-28 10:16 ` Michal Marek
0 siblings, 1 reply; 9+ messages in thread
From: Geoff Levand @ 2014-01-28 1:48 UTC (permalink / raw)
To: Michal Marek; +Cc: linux-kbuild, David Howells
The generic makefile now sets '-Wa,--gdwarf2' in KBUILD_AFLAGS, so
this setting is no longer needed in arch makefiles.
Also remove a commented out addition of a -O1 to KBUILD_CFLAGS, and
comment text relating to these removed lines.
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
---
v2: Removed unused CONFIG_DEBUG_INFO conditional and related text comment.
arch/frv/Makefile | 7 -------
1 file changed, 7 deletions(-)
diff --git a/arch/frv/Makefile b/arch/frv/Makefile
index 4d1b1e9..2a8fb73 100644
--- a/arch/frv/Makefile
+++ b/arch/frv/Makefile
@@ -74,13 +74,6 @@ KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media
KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2
KBUILD_AFLAGS += -mno-fdpic
-# make sure the .S files get compiled with debug info
-# and disable optimisations that are unhelpful whilst debugging
-ifdef CONFIG_DEBUG_INFO
-#KBUILD_CFLAGS += -O1
-KBUILD_AFLAGS += -Wa,--gdwarf2
-endif
-
head-y := arch/frv/kernel/head.o
core-y += arch/frv/kernel/ arch/frv/mm/
--
1.8.1.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH V2 3/3] mn10300: Remove redundant debugging info flag
2014-01-27 21:08 ` Michal Marek
@ 2014-01-28 1:48 ` Geoff Levand
0 siblings, 0 replies; 9+ messages in thread
From: Geoff Levand @ 2014-01-28 1:48 UTC (permalink / raw)
To: Michal Marek; +Cc: linux-kbuild, David Howells
The generic makefile now sets '-Wa,--gdwarf2' in KBUILD_AFLAGS, so
this setting is no longer needed in arch makefiles.
Also remove a commented out addition of a -O1 to KBUILD_CFLAGS, and
comment text relating to these removed lines.
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
---
v2: Removed unused CONFIG_DEBUG_INFO conditional and related text comment.
arch/mn10300/Makefile | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/mn10300/Makefile b/arch/mn10300/Makefile
index a3d0fef..3f1ea5d 100644
--- a/arch/mn10300/Makefile
+++ b/arch/mn10300/Makefile
@@ -92,14 +92,6 @@ define archhelp
echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
endef
-# If you make sure the .S files get compiled with debug info,
-# uncomment the following to disable optimisations
-# that are unhelpful whilst debugging.
-ifdef CONFIG_DEBUG_INFO
-#KBUILD_CFLAGS += -O1
-KBUILD_AFLAGS += -Wa,--gdwarf2
-endif
-
#
# include the appropriate processor- and unit-specific headers
#
--
1.8.1.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH V2 2/3] frv: Remove redundant debugging info flag
2014-01-28 1:48 ` [PATCH V2 2/3] frv: Remove redundant " Geoff Levand
@ 2014-01-28 10:16 ` Michal Marek
0 siblings, 0 replies; 9+ messages in thread
From: Michal Marek @ 2014-01-28 10:16 UTC (permalink / raw)
To: Geoff Levand; +Cc: linux-kbuild, David Howells
On 28.1.2014 02:48, Geoff Levand wrote:
> The generic makefile now sets '-Wa,--gdwarf2' in KBUILD_AFLAGS, so
> this setting is no longer needed in arch makefiles.
>
> Also remove a commented out addition of a -O1 to KBUILD_CFLAGS, and
> comment text relating to these removed lines.
>
> Cc: David Howells <dhowells@redhat.com>
> Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
> ---
> v2: Removed unused CONFIG_DEBUG_INFO conditional and related text comment.
Thanks, I added v2 of 2/3 and 3/3 to kbuild.git#kbuild.
Michal
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-01-28 10:16 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-11 23:34 [PATCH 0/3] Fix debugging info for .S files Geoff Levand
2013-12-11 23:34 ` [PATCH 2/3] frv: Remove redundent debugging info flag Geoff Levand
2014-01-28 1:48 ` [PATCH V2 2/3] frv: Remove redundant " Geoff Levand
2014-01-28 10:16 ` Michal Marek
2013-12-11 23:34 ` [PATCH 1/3] kbuild: Fix debugging info generation for .S files Geoff Levand
2014-01-27 21:03 ` Michal Marek
2013-12-11 23:34 ` [PATCH 3/3] mn10300: Remove redundent debugging info flag Geoff Levand
2014-01-27 21:08 ` Michal Marek
2014-01-28 1:48 ` [PATCH V2 3/3] mn10300: Remove redundant " Geoff Levand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).