This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Does your change to sysdeps/i386/i486/bits/string.h really work?
- From: "H . J . Lu" <hjl at lucon dot org>
- To: aj at suse dot de
- Cc: GNU C Library <libc-alpha at sources dot redhat dot com>
- Date: Wed, 10 Apr 2002 14:06:27 -0700
- Subject: Re: Does your change to sysdeps/i386/i486/bits/string.h really work?
- References: <20020410134732.A11494@lucon.org>
On Wed, Apr 10, 2002 at 01:47:32PM -0700, H . J . Lu wrote:
> With your change
>
> http://sources.redhat.com/ml/libc-hacker/2002-03/msg00060.html
>
> I got
>
> ../sysdeps/i386/i486/bits/string.h:1541: Can't find a register in class
> `GENERAL_REGS' while reloading `asm'.
>
> when I built glibc with -D__USE_STRING_INLINES using gcc 2.96 and gcc
> 3.1 20020408. It died on intl/loadmsgcat.os. -D__USE_STRING_INLINES
> and -fPIC won't work together.
>
>
Here is a small testcase.
# gcc -c -O -fPIC ... foo.c
/tmp/foo.c: In function `foo':
../sysdeps/i386/i486/bits/string.h:1541: Can't find a register in class `GENERAL_REGS' while reloading `asm'.
H.J.
----
#include <string.h>
char *
foo (char *nullentry)
{
size_t nullentrylen;
const char *charsetstr;
charsetstr = nullentry;
charsetstr += strlen ("charset=");
nullentrylen = strcspn (charsetstr, " \t\n");
return nullentry;
}