From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8FA04B7CE7 for ; Thu, 4 Feb 2010 10:45:57 +1100 (EST) Subject: Re: [patch 2/2] kbuild: move -fno-dwarf2-cfi-asm to powerpc only From: Benjamin Herrenschmidt To: akpm@linux-foundation.org In-Reply-To: <201002022240.o12Me3aI018845@imap1.linux-foundation.org> References: <201002022240.o12Me3aI018845@imap1.linux-foundation.org> Content-Type: text/plain; charset="UTF-8" Date: Thu, 04 Feb 2010 10:22:19 +1100 Message-ID: <1265239339.8287.126.camel@pasglop> Mime-Version: 1.0 Cc: ak@linux.intel.com, linuxppc-dev@ozlabs.org, andi@firstfloor.org, mmarek@suse.cz, kyle@mcmartin.ca List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 2010-02-02 at 14:40 -0800, akpm@linux-foundation.org wrote: > From: Andi Kleen > > Better dwarf2 unwind information is a good thing, it allows better > debugging with kgdb and crash and helps systemtap. > > Commit 003086497f07f7f1e67c0c295e261740f822b377 ("Build with > -fno-dwarf2-cfi-asm") disabled some CFI information globally to work > around a module loader bug on powerpc. > > But this disables the better unwind tables for all architectures, not just > powerpc. Move the workaround to powerpc and also add a suitable comment > that's it really a workaround. > > This improves dwarf2 unwind tables on x86 at least. > > Signed-off-by: Andi Kleen > Cc: Kyle McMartin Acked-by: Benjamin Herrenschmidt Do you want me to carry that in powerpc-next ? Cheers, Ben. > Cc: Michal Marek > Signed-off-by: Andrew Morton > --- > > Makefile | 3 --- > arch/powerpc/Makefile | 5 +++++ > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff -puN Makefile~kbuild-move-fno-dwarf2-cfi-asm-to-powerpc-only Makefile > --- a/Makefile~kbuild-move-fno-dwarf2-cfi-asm-to-powerpc-only > +++ a/Makefile > @@ -579,9 +579,6 @@ KBUILD_CFLAGS += $(call cc-option,-Wno-p > # disable invalid "can't wrap" optimizations for signed / pointers > KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) > > -# revert to pre-gcc-4.4 behaviour of .eh_frame > -KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) > - > # conserve stack if available > KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) > > diff -puN arch/powerpc/Makefile~kbuild-move-fno-dwarf2-cfi-asm-to-powerpc-only arch/powerpc/Makefile > --- a/arch/powerpc/Makefile~kbuild-move-fno-dwarf2-cfi-asm-to-powerpc-only > +++ a/arch/powerpc/Makefile > @@ -112,6 +112,11 @@ KBUILD_CFLAGS += $(call cc-option,-mspe= > # kernel considerably. > KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) > > +# FIXME: the module load should be taught about the additional relocs > +# generated by this. > +# revert to pre-gcc-4.4 behaviour of .eh_frame > +KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) > + > # Never use string load/store instructions as they are > # often slow when they are implemented at all > KBUILD_CFLAGS += -mno-string > _