On 07/11/2014 02:45 AM, Paul Eggert wrote:
Thanks, it seems to be a compiler bug on Ubuntu: "#pragma weak" doesn't work,
and this breaks gnulib's glthread module. For what it's worth I filed a bug report here:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1340250
Are you expert enough in Ubuntuese to suggest a workaround?
I found a work-around to test like this:
$ gl_cv_have_weak=no ./gnulib-tool --test localename
"gl_cv_have_weak" is defined in ./m4/threadlib.m4 .
In this file, there's a mention of "weak symbols evaluating to zero on cygwin",
which sounds somewhat similar to what you've described in the Ubuntu but report.
The bottom part of the m4 file contains a table of supported platform and specifically
references the "test-lock" test.
Perhaps there's a way to adjust the M4 test to detect Ubuntu's gcc bug as well?