On 6/12/2008 6:14 AM, Will Newton wrote:
> > On Thu, Jun 12, 2008 at 8:08 AM, Denys Vlasenko
> > <[EMAIL PROTECTED]> wrote:
>> >> This is the patch wich ONLY replaces strlen("const") with
>> >> sizeof("const")-1. Let's check assembly, do we see strlen
>> >> in original version?
> >
> > What compiler flags were used? It's possible to disable this
> > optimization in gcc.
> >
> > Maybe replace strlen with __builtin_strlen?

uClibc is normally built with -fno-builtin, which will prevent the strlen()
optimization.  Using __builtin_strlen() seems reasonable here.

--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
_______________________________________________
uClibc mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

Reply via email to