[libc++] Patch: build regression
"C. Bergström"
cbergstrom at pathscale.com
Mon Jan 6 08:31:53 PST 2014
I realize this commit fixes an issue and that before it wasn't correct
c++11. The problem is that it created a build regression (below)
https://github.com/llvm-mirror/libcxx/commit/854a7a02b4bf2d73735559003e3c4abfda2b209f
This "hacky" patch is the best I've got to offer..
https://gist.github.com/erdizz/9257a34c7ef2c0682060
It produces with gcc-4.7 (4.8 not tested, but I don't expect any difference)
---------
SLES build host includes this
--------------------
/*
/* Return nonzero if VALUE is not a number. */
__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
/* Bessel functions. */
__MATHCALL (j0,, (_Mdouble_));
__MATHCALL (j1,, (_Mdouble_));
__MATHCALL (jn,, (int, _Mdouble_));
__MATHCALL (y0,, (_Mdouble_));
__MATHCALL (y1,, (_Mdouble_));
__MATHCALL (yn,, (int, _Mdouble_));
*/
Error
----------------
In file included from
/root/bamboo-agent-home/xml-data/build-dir/NIGHTLYLINUX-DEBUG/src/libcxx/src/random.cpp:16:
In file included from
/root/bamboo-agent-home/xml-data/build-dir/NIGHTLYLINUX-DEBUG/src/libcxx/include/random:1647:
/root/bamboo-agent-home/xml-data/build-dir/NIGHTLYLINUX-DEBUG/src/libcxx/include/cmath:431:1:
error: functions that differ only in their return type cannot be overloaded
isnan(double __x) _NOEXCEPT
^
/usr/include/bits/mathcalls.h:235:19: note: previous declaration is here
__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
^
/usr/include/math.h:65:31: note: expanded from macro '__MATHDECL_1'
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
/usr/include/math.h:68:42: note: expanded from macro '__MATH_PRECNAME'
#define __MATH_PRECNAME(name,r) __CONCAT(name,r)
^
/usr/include/sys/cdefs.h:80:23: note: expanded from macro '__CONCAT'
#define __CONCAT(x,y) x ## y
^
1 error generated.
gmake[5]: *** [lib/CMakeFiles/cxx.dir/__/src/random.cpp.o] Error 1
gmake[4]: *** [lib/CMakeFiles/cxx.dir/all] Error 2
gmake[3]: *** [all] Error 2
More information about the cfe-commits
mailing list