AIX's system header provides these C++ overloads for compatibility with older XL C++ implementations, but they can be disabled by defining __LIBC_NO_CPP_MATH_OVERLOADS__ since AIX 7.2 TL 5 SP 3.
Since D109078 landed clang will define this macro when using libc++ on AIX and we already run the lit tests with it too. This change will enable the overloads in libc++'s math.h and we'll continue to require the compiler to define the macro going forward.
We shouldn't be adding magic incantations to make a C Standard Library work the way it should. We should fix it so that it works properly instead.
The correct behavior for the C library would be to *not* provide those overloads unless explicitly requested, not the other way around. If that can't be fixed, then I suggest the compiler be fixed so that it enforces -D__COMPATMATH__ on AIX.