Bug#37295: fno-inline causes strcpy(foo, "") to break
>>>>> Lars Wirzenius writes:
> Package: libc6-dev
> Version: 2.1.1-2
> [...]
> Ergo, it works as it should. If I use -fno-inline, however, it fails to work:
> $ gcc -O -fno-inline foo.c
> /tmp/cc49Syvn.o: In function `main':
> /tmp/cc49Syvn.o(.text+0x91): undefined reference to `__strcpy_small'
> collect2: ld returned 1 exit status
> As far as I understand, I should be able to use -fno-inline. The problem,
> I think, is due to how /usr/include/string.h and/or /usr/include/bits/string2.h
> decide on whether to use a macro of strcpy that expands to a call to
> __strcpy_small in some circumstances.
You're right. The problem is the usage of `extern inline' without a
normal implementation of these functions.
I've fixed this now in the glibc sources upstream. With glibc 2.1.1
final -fno-inline should work again without problems - even with
string functions.
Thanks,
Andreas
--
Andreas Jaeger aj@arthur.rhein-neckar.de jaeger@informatik.uni-kl.de
for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de
Reply to: