Boost version: 1.72.0 (Arch Linux package version: boost 1.72.0-2).
The other two sorting methods I tested - spreadsort::float_sort and pdqsort - work just fine with these compiler flags.
These two flags are used by default in KDE: https://invent.kde.org/frameworks/extra-cmake-modules/-/blob/master/kde-modules/KDECompilerSettings.cmake. Possible workaround (which will hopefully work): create a tiny static library that disables these flags and calls spinsort or flat_stable_sort.