[libc] Add missing -latomic for rv32 (#99337)

On rv32, libatomic is needed to build libc when mpfr and gmp are enabled.
This commit is contained in:
Mikhail R. Gadelha 2024-07-17 18:41:12 +02:00 committed by GitHub
parent ac1d5facf6
commit e5ccc7136d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -13,6 +13,6 @@ else()
SOURCES
${LIBC_SOURCE_DIR}/utils/MPFRWrapper/check_mpfr.cpp
LINK_LIBRARIES
-lmpfr -lgmp
-lmpfr -lgmp -latomic
)
endif()

View File

@ -24,7 +24,7 @@ function(add_fp_unittest name)
message(FATAL_ERROR "Hermetic math test cannot require MPFR.")
endif()
set(test_type UNIT_TEST_ONLY)
list(APPEND MATH_UNITTEST_LINK_LIBRARIES libcMPFRWrapper -lmpfr -lgmp)
list(APPEND MATH_UNITTEST_LINK_LIBRARIES libcMPFRWrapper -lmpfr -lgmp -latomic)
endif()
list(APPEND MATH_UNITTEST_LINK_LIBRARIES LibcFPTestHelpers)