Mailing List Archive

-ffreestanding or not -ffreestanding
On Wed, May 21, 2008 at 02:12:07AM +0100, Al Viro wrote:
> Content-Length: 788
> Lines: 30
>
> Whether we sidestep it in init/main.c or not, such situations
> will arise again; compiler does generate calls of strcat()
> on optimizations, so we really ought to have an out-of-line
> version...
>...

Can we try to get this sorted out properly instead of constantly
fiddling with it?

Currently we use -ffreestanding on some architectures and fix breakages
on the other architectures when they arise.

The options I see for getting this fixed properly are:
- use -ffreestanding on all architectures or
- don't use -ffreestanding on any architecture and move the string
functions (and perhaps other functions if required) out-of-line

I'd prefer the first option, but I know that not everyone agrees with me.

No matter which option we choose, if we get an agreement on this one
I can send patches for it.

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Re: -ffreestanding or not -ffreestanding [ In reply to ]
Hi,

On Wed, 21 May 2008, Adrian Bunk wrote:

> Can we try to get this sorted out properly instead of constantly
> fiddling with it?
>
> Currently we use -ffreestanding on some architectures and fix breakages
> on the other architectures when they arise.

This won't help completely unless you also clean up all archs to use the
same mappings to the builtin functions.

The main problem I had with -ffreestanding is that it's awkward to map a
library function to the builtin function and also provide the fallback
from lib/string.c.
If you look at asm-m68k/string.h I once tried this with the mem* functions
and I still have the duplicated memcmp in arch/m68k/lib/string.c.
(You could argue that it would be easier to just remove the define for
memcmp in this specific case, but I'm interested in the general case.)

bye, Roman
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/