[U-Boot] [RFC] x86: Do no use reparm as it break libgcc linkage
Graeme Russ
graeme.russ at gmail.com
Thu Nov 10 05:22:34 CET 2011
Hi Mike,
On Thu, Nov 10, 2011 at 3:13 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> On Wednesday 09 November 2011 16:42:51 Graeme Russ wrote:
>> On Thu, Nov 10, 2011 at 4:12 AM, Mike Frysinger wrote:
>> > On Wednesday 09 November 2011 05:32:59 Graeme Russ wrote:
>> >> --- a/arch/x86/config.mk
>> >> +++ b/arch/x86/config.mk
>> >>
>> >> -PLATFORM_CPPFLAGS += -mregparm=3
>> >> -PLATFORM_CPPFLAGS += -fomit-frame-pointer
>> >
>> > this sounds like you're throwing the baby out with the bath water.
>> > doesn't this severely affect the generated code ?
>>
>> No - omit-frame-pointer is enabled by -O2 and also:
>>
>> http://gcc.gnu.org/gcc-4.6/changes.html
>>
>> "The default setting (when not optimizing for size) for 32-bit
>> GNU/Linux and Darwin x86 targets has been changed to
>> -fomit-frame-pointer. The default can be reverted to
>> -fno-omit-frame-pointer by configuring GCC with the
>> --enable-frame-pointer configure option."
>>
>> So the flag is a do-nothing
>
> ok, except:
> - we build u-boot with -Os and not -O2
> - i'd say most people aren't using gcc-4.6
Ah, OK then I'll leave it in - It was only a cruft reduction plan anyway :)
> i was referring also to throwing away -mregparm=3 ...
Yes, it does effect the code - It makes it ABI compliant like everyone
else (except ARM) :) I expect a code size increase (have not measured
it yet)
As I've stated, I really do not want arbitrary wrapper functions where
it is not obvious that they need to be updated if new code uses
previously unused (and unwrapped) libgcc functions (in particular if
there are new libgcc functions in the future which we can't wrap
todday anyway)
Option a) is to remove regparm=3
Option b) is to use private libgcc
Option c) is to use wrappers
If this patch works, I'll look at the code impact and we can discuss
which option we take :)
Regards,
Graeme
More information about the U-Boot
mailing list