On 7/17/20 6:48 AM, Richard W.M. Jones wrote:
> I suspect that the fragment lands in the body of main, where the
> reference to sys_errlist is simply optimized away.
Very true. Let's see what the test file actually contains
by adding an exit into the configure script ...
int
main ()
{
extern int sys_errlist; char *p = &sys_errlist;
;
return 0;
Indeed, this could be a case of link-time optimization (since p is not
used, the resolution of &sys_errlist does not matter). Perhaps
enhancing the test to do:
char *p = &sys_errlist;
return p[0];
bypasses the chance for link optimization?
But as pointed out elsewhere, if another test for new functions
succeeds, getting this test correct is less important.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization:
qemu.org |
libvirt.org