Re: strxxx and gcc-3.4

From: Maciej W. Rozycki
Date: Tue Feb 17 2004 - 10:26:34 EST


On Sat, 14 Feb 2004, J.A. Magallon wrote:

> Finally I got the problem with emu10k1. It was a sprintf->strcpy that
> the compiler could not inline. And out-of-line strcpy was not exported.
> Exporting it solved the problem (in -mm tree, that has the out-of-line
> versions).
>
> Current situation: even -mm, that includes many fixes for gcc-3.4, can
> fail to build. Currently in 2.6.3-rc2-mm1 there are:
>
> werewolf:/usr/src/linux-2.6.3-rc2-mm1# grep -r sprintf * | grep \"%s\" | wc -l
> 63
>
> instances of that stupid sprintf(s,"%s", .... ) thing.
>
> Options:
> - Fix all of them. I don't like it, the kernel should not depend on what
> gcc does internally
> - Use -fno-builtin-sprintf. I think gcc swaps sprintf to strcpy because
> it sees it as a builtin, but as finds a declaration for an external
> strcpy does not use the builtin for strcpy.
> - Kill off all str/mem functions and just let gcc insert builtins.
[...]
> Preferences ?

Fix gcc before it's released. Has the problem been reported? I've
hesitated to do that as I use an outdated gcc 3.4 snapshot (from the
pre-branch times) and I've assumed it may have been fixed since.

--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@xxxxxxxxxxxxx, PGP key available +
-
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/