Skip to content

Commit fa206ba

Browse files
mikhailramalhoyuxuanchen1997
authored andcommitted
[libc] Add missing -latomic for rv32 (#99337)
Summary: On rv32, libatomic is needed to build libc when mpfr and gmp are enabled. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250843
1 parent 5f855e9 commit fa206ba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libc/cmake/modules/LLVMLibCCheckMPFR.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ else()
1313
SOURCES
1414
${LIBC_SOURCE_DIR}/utils/MPFRWrapper/check_mpfr.cpp
1515
LINK_LIBRARIES
16-
-lmpfr -lgmp
16+
-lmpfr -lgmp -latomic
1717
)
1818
endif()

libc/test/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function(add_fp_unittest name)
2424
message(FATAL_ERROR "Hermetic math test cannot require MPFR.")
2525
endif()
2626
set(test_type UNIT_TEST_ONLY)
27-
list(APPEND MATH_UNITTEST_LINK_LIBRARIES libcMPFRWrapper -lmpfr -lgmp)
27+
list(APPEND MATH_UNITTEST_LINK_LIBRARIES libcMPFRWrapper -lmpfr -lgmp -latomic)
2828
endif()
2929
list(APPEND MATH_UNITTEST_LINK_LIBRARIES LibcFPTestHelpers)
3030

0 commit comments

Comments
 (0)