[preliminary patch] Fix build failure with Debian gcc-4.7
Daniel Schepler
dschepler@gmail.com
Sat Jul 7 03:20:00 GMT 2012
As posted in BZ#14281, glibc (git master) fails to build in Debian sid amd64
using gcc-4.7. I've traced it to Debian applying the patch from
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33763#c31 .
It seems the GCC developers aren't agreed on what the exact behavior should be
if an __always_inline__ definition is followed by a non-inline definition. The
attached patch is an update for s_isnan.c to make it a bit more robust with
regards to this -- it uses a separate name for the offline version of __isnan,
rather than trying to reuse the name __isnan. It generates the same asm
afaict as the unpatched version using Debian gcc-4.6 (which doesn't include
pr33763.diff), and Debian gcc-4.7 also generates roughly the same asm with the
patched version.
This is mostly a request for comments on the patch, and definitely not the final
version of the patch, since I'd have to do the same thing in several more files
before glibc will build. In particular, the additional lines should probably
be declared as a macro, but I have no idea where the best place would be to
define that macro.
--
Daniel Schepler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: s_isnan_debian_gcc_fix.diff
Type: text/x-patch
Size: 531 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120707/7ee5f45d/attachment.bin>
More information about the Libc-alpha
mailing list