https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96526
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- You could define __builtin_totalorder functions, but watch out for the change made to totalorder functions following a TS 18661-1 clarification request, from floating-point argument types to pointer argument types (so you'd need to handle all the cases of libm not having the functions, libm having them with the old prototypes as in glibc 2.25 through 2.30, libm having them with the new prototypes as in glibc 2.31 and later).