CMake doesn't react to the global env variable CPPFLAGS; feed the contents of it to CMake via CXXFLAGS. This makes sure that libc++ is built with -D__USE_MINGW_ANSI_STDIO=1, which fixes the formatting output of long doubles on x86. This should fix issues #21768 and #17795.