Re: [2.6 patch] re-add -ffreestanding

From: Roman Zippel
Date: Thu Sep 07 2006 - 10:27:14 EST


Hi,

On Thu, 7 Sep 2006, Kyle Moffett wrote:

> So it may be OK for sprintf(buf,"%s",str); to decay to strcpy(buf, str) in the
> kernel, but if it's not the ONLY ways to turn it off are -fno-builtin-sprintf,
> -fno-builtin, and -ffreestanding. Explicitly disabling these optimizations is
> virtually guaranteed that we'll miss one, we should turn them all off and
> selectively enable the ones that make sense.

No, that would be a complete PITA and so far no arch maintainer wants to
do this.
gcc cannot do arbitrary transformations, the result has to be the same
according to the standard and since the standard functions we provide are
standards compliant (modulo bugs, minus fp support) there is no problem.
It's possible that gcc generates a call to a function we don't provide,
but the resulting link failure is hard to miss.

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