This is the mail archive of the
libc-hacker@cygnus.com
mailing list for the glibc project.
Re: Optimized string operations for i586...
- To: gafton@redhat.com (Cristian Gafton)
- Subject: Re: Optimized string operations for i586...
- From: hjl@lucon.org (H.J. Lu)
- Date: Thu, 8 Apr 1999 14:37:44 -0700 (PDT)
- Cc: libc-hacker@cygnus.com
>
>
> I am trying to build the 2.1.1 using something like:
> export CFLAGS=" -D__USE_STRING_INLINES -fstrict-aliasing -g -O3"
> ../glibc/configure --prefix=/usr --enable-add-ons=yes i586-pc-linux
>
> Using egcs 1.1.2 everything is okay, but the resulting libc is broken;
> almos all string operations are causing a segfault. Most frequesnt is
> happening in ../sysdeps/i386/i486/bits/string.h when __strncpy_gg is used.
>
> Anybody knows if this is supposed to work?
>
I have no problems with this. However, things may be different if
your gcc is configured with i386-pc-linux. If you want to optimize
glibc for i586, you should do
export CFLAGS="-mcpu=i586 -march=i586 -D__USE_STRING_INLINES -fstrict-aliasing -g -O3"
../glibc/configure --prefix=/usr --enable-add-ons=yes i586-pc-linux
In that way, gcc will generate code for i586, no matter what target
gcc is optimized for by default, AND glibc will be configured for i586.
--
H.J. Lu (hjl@gnu.org)