All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Kyle Moffett <mrmacman_g4@mac.com>
Cc: Adrian Bunk <bunk@stusta.de>, Andi Kleen <ak@suse.de>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org,
	Roman Zippel <zippel@linux-m68k.org>,
	linux-arch@vger.kernel.org
Subject: Re: [2.6 patch] re-add -ffreestanding
Date: Thu, 7 Sep 2006 15:25:47 +0100	[thread overview]
Message-ID: <20060907142547.GD29532@flint.arm.linux.org.uk> (raw)
In-Reply-To: <A93564A8-3F3A-4BA3-9557-F3D75BE59052@mac.com>

On Thu, Sep 07, 2006 at 10:03:16AM -0400, Kyle Moffett wrote:
> On Sep 07, 2006, at 07:43:58, Russell King wrote:
> >On Thu, Sep 07, 2006 at 12:27:40PM +0200, Adrian Bunk wrote:
> >>And I'm getting bashed for sendind a patch to revert it "only" to  
> >>linux-kernel...
> >
> >As far as your argument that the kernel is not a hosted  
> >environment, that's debatable (as you're finding out).
> >
> >If we decide that we want the compiler to treat our source as if it  
> >were a hosted environment, and we provide sufficient implementation  
> >of a conforming nature of a hosted environment then that is our  
> >perogative to do so.  That is a decision that we are entirely free  
> >to make.  By doing so, we take on the responsibility to provide  
> >whatever is required for a hosted environment as opposed to the  
> >more limited functionality of a freestanding environment.
> 
> Ick, can anybody be persuaded to post actual effective code changes?   

I've already specified the changes on ARM, and suggested a fix for
them - but that got poo-poo'd.  I said:

On Wed, Aug 30, 2006 at 07:39:05PM +0100, Russell King wrote:
> Looking at the effect of -ffreestanding on ARM, it appears that on one
> hand, the overall image size is reduced by 0.016% but we end up with worse
> code - eg, strlen() of the same string in the same function evaluated
> multiple times vs once without -ffreestanding.
>
> The difference probably comes down to the lack of __attribute__((pure))
> on our string functions in linux/string.h.
>
> If we are going to go for -ffreestanding, we need to fix linux/string.h
> in that respect _first_.

So the effective code changes you ask for are: "multiple calls to
standard library functions that would not otherwise be made without
-ffreestanding".

Hence, for -ffreestanding to be acceptable to me, we need to fix
linux/string.h _first_.  That's really all I'm asking for but apparantly
that's too much to ask for.

It's not realistic to post the actual code changes because virtually every
line is different - due to differences in the register allocation caused
by the variations in code generation.  Hence, to compare it properly it's
a painstaking line by line read of each to understand what's going on and
manual compare.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2006-09-07 14:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-30 17:57 [2.6 patch] re-add -ffreestanding Adrian Bunk
2006-08-30 18:13 ` Andi Kleen
2006-08-30 18:39   ` Russell King
2006-09-06 22:37     ` Adrian Bunk
2006-09-06 23:38       ` Roman Zippel
2006-09-06 23:50         ` Adrian Bunk
2006-09-07  0:05           ` Roman Zippel
2006-09-07  0:37             ` Adrian Bunk
2006-09-07  0:47               ` Roman Zippel
2006-09-07  1:02                 ` Adrian Bunk
2006-09-07  1:23                   ` Roman Zippel
2006-09-07  2:23                     ` Adrian Bunk
2006-09-07 10:25                       ` Roman Zippel
2006-09-07  6:30       ` Russell King
2006-09-07 10:27         ` Adrian Bunk
2006-09-07 11:40           ` Roman Zippel
2006-09-07 11:43           ` Russell King
2006-09-07 14:03             ` Kyle Moffett
2006-09-07 14:25               ` Russell King [this message]
2006-09-07 14:29               ` Roman Zippel
  -- strict thread matches above, loose matches on Subject: below --
2006-08-21 21:21 Adrian Bunk
2006-08-21 21:24 ` Andi Kleen
2006-08-21 21:46   ` Adrian Bunk
2006-08-21 22:09     ` Andi Kleen
2006-08-21 22:24       ` Adrian Bunk
2006-08-21 22:27         ` Andi Kleen
2006-08-21 22:58           ` Adrian Bunk
2006-08-21 23:13             ` Andi Kleen
2006-08-22  3:37               ` Kyle Moffett
2006-08-22 10:37                 ` Andi Kleen
2006-08-22 11:18                   ` Adrian Bunk
2006-08-21 23:33           ` Roman Zippel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060907142547.GD29532@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=bunk@stusta.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrmacman_g4@mac.com \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.