This is the mail archive of the libc-hacker@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Optimized string operations for i586...


> 
> 
> 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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]