In bootstrap testing on Power9 target with libcxx enabled, build would fail because glibc uses __builtin_types_compatible_p in definition of these macros but the builtin is not available in C++ mode. And glibc assumes:
/* Since __builtin_isinf_sign is broken for float128 before GCC 7.0, use the helper function, __isinff128, with older compilers. This is only provided for C mode, because in C++ mode, GCC has no support for __builtin_types_compatible_p (and when in C++ mode, this macro is not used anyway, because libstdc++ headers undefine it). */
So we need another way to do the implementation, just like rG767eadd78.