Makefile: Never use -fno-omit-frame-pointer
RFC PATCH 1/2 Makefile: Never use -fno-omit-frame-pointer
According to Segher Boessenkool and GCC manual, -fomit-frame-pointer is only the default when optimising on archs/ABIs where it doesn't hinder debugging and -pg. So, we do not get it by default on x86, not at any optimisation level.
On the other hand, *using* -fno-omit-frame-pointer causes gcc to produce buggy code on PowerPC targets.
If Segher and GCC manual are right, this patch should be a no-op for all arches except PowerPC, where the patch fixes gcc issues.
---
See this thread for more discussion:
http://osdir.com/ml/linux-kernel/2009-05/msg01754.html
p.s.
Obviously, I didn't test this patch on anything else but PPC32. ;-)
Segher, do you know if all GCC versions that we support for building Linux are behaving the way that GCC manual describe?
Thanks,
Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
@@ -535,7 +535,7 @@ KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) endif ifdef CONFIG_FRAME_POINTER -KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls +KBUILD_CFLAGS += -fno-optimize-sibling-calls else KBUILD_CFLAGS += -fomit-frame-pointer endif
Signature · 1 line
1.6.3.1
Quoted 14 lines · Anton Vorontsov
According to Segher Boessenkool and GCC manual, -fomit-frame-pointer is only the default when optimising on archs/ABIs where it doesn't hinder debugging and -pg. So, we do not get it by default on x86, not at any optimisation level.
On the other hand, *using* -fno-omit-frame-pointer causes gcc to produce buggy code on PowerPC targets.
If Segher and GCC manual are right, this patch should be a no-op for all arches except PowerPC, where the patch fixes gcc issues.
Signed-off-by Anton Vorontsov <[email protected]>---
Quoted 8 lines
See this thread for more discussion:
http://osdir.com/ml/linux-kernel/2009-05/msg01754.htmlp.s.
Obviously, I didn't test this patch on anything else but PPC32. ;-)Segher, do you know if all GCC versions that we support for building Linux are behaving the way that GCC manual describe?
No news is good news... Ingo, can we merge this into -tip for testing?
Thanks,
Quoted 23 lines
Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)Makefile +1
-1@@ -535,7 +535,7 @@ KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) endif ifdef CONFIG_FRAME_POINTER -KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls +KBUILD_CFLAGS += -fno-optimize-sibling-calls else KBUILD_CFLAGS += -fomit-frame-pointer endifSignature · 6 lines
1.6.3.1 _______________________________________________ Linuxppc-dev mailing list [email protected] https://lists.ozlabs.org/listinfo/linuxppc-dev
Signature · 3 lines
Anton Vorontsov email: [email protected] irc://irc.freenode.net/bd2
[Sorry for not replying earlier, somehow I missed this mail]
Quoted 2 lines
Quoted 2 lines
On the other hand, *using* -fno-omit-frame-pointer causes gcc to produce buggy code on PowerPC targets.
It doesn't cause the problem, it only exposes it. And, of course, only on certain GCC versions.
Quoted 2 lines
Quoted 2 lines
Segher, do you know if all GCC versions that we support for building Linux are behaving the way that GCC manual describe?
I believe so, yes.
Segher
Quoted 18 lines · Anton Vorontsov
Quoted 17 lines · Anton Vorontsov
According to Segher Boessenkool and GCC manual, -fomit-frame-pointer is only the default when optimising on archs/ABIs where it doesn't hinder debugging and -pg. So, we do not get it by default on x86, not at any optimisation level.
On the other hand, *using* -fno-omit-frame-pointer causes gcc to produce buggy code on PowerPC targets.
If Segher and GCC manual are right, this patch should be a no-op for all arches except PowerPC, where the patch fixes gcc issues.
Signed-off-by Anton Vorontsov <[email protected]>---
See this thread for more discussion:
http://osdir.com/ml/linux-kernel/2009-05/msg01754.html
Quoted 8 lines
Quoted 5 lines
p.s.
Obviously, I didn't test this patch on anything else but PPC32. ;-)Segher, do you know if all GCC versions that we support for building Linux are behaving the way that GCC manual describe?
No news is good news... Ingo, can we merge this into -tip for testing?
Changes to the top level Makefile should really go via Sam's kbuild tree.
Ingo
Quoted 24 lines · Ingo Molnar
Quoted 21 lines · Anton Vorontsov
Quoted 20 lines · Anton Vorontsov
According to Segher Boessenkool and GCC manual, -fomit-frame-pointer is only the default when optimising on archs/ABIs where it doesn't hinder debugging and -pg. So, we do not get it by default on x86, not at any optimisation level.
On the other hand, *using* -fno-omit-frame-pointer causes gcc to produce buggy code on PowerPC targets.
If Segher and GCC manual are right, this patch should be a no-op for all arches except PowerPC, where the patch fixes gcc issues.
Signed-off-by Anton Vorontsov <[email protected]>---
See this thread for more discussion:
http://osdir.com/ml/linux-kernel/2009-05/msg01754.htmlp.s.
Obviously, I didn't test this patch on anything else but PPC32. ;-)
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Segher, do you know if all GCC versions that we support for building Linux are behaving the way that GCC manual describe?
No news is good news... Ingo, can we merge this into -tip for testing?
Changes to the top level
Makefileshould really go via Sam's kbuild tree.
Sam, any thoughts about these patches?
Thanks!
Signature · 3 lines
Anton Vorontsov email: [email protected] irc://irc.freenode.net/bd2