diff --git a/libc/utils/MPFRWrapper/CMakeLists.txt b/libc/utils/MPFRWrapper/CMakeLists.txt index 829c2fb2c2f90..8aeee2463dc51 100644 --- a/libc/utils/MPFRWrapper/CMakeLists.txt +++ b/libc/utils/MPFRWrapper/CMakeLists.txt @@ -28,6 +28,8 @@ if(LIBC_TESTS_CAN_USE_MPFR) MPFRUtils.h ) _get_common_test_compile_options(compile_options "" "") + # mpfr/gmp headers do not work with -ffreestanding flag. + list(REMOVE_ITEM compile_options "-ffreestanding") target_compile_options(libcMPFRWrapper PRIVATE -O3 ${compile_options}) add_dependencies( libcMPFRWrapper