From 251a768d52f310bda01b32af4644a1d0b91ecb4c Mon Sep 17 00:00:00 2001 From: Sh0g0-1758 Date: Tue, 28 Jan 2025 11:14:43 +0530 Subject: [PATCH] [libc][complex] remove -ffreestanding flag from MPFRUtils compile options --- libc/utils/MPFRWrapper/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) 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