[libc][math] Some FP tests fail to link for AArch64 soft nofp due to missing `fma` definition
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Many of the FP tests fail in AArch64 soft nofp because, due to the lack of FP instructions, clang emits calls to `fma`, but its definition is missing from the hermetic C library put together for the hermetic tests. Even if `libc.src.math.fma` is added to the `DEPENDS` lists for the tests, it doesn't work because the `fma` function is under a mangled internal namespace (`LIBC_NAMESPACE_DECL`), not in the global one, hence the linker still can't find the symbol.
One example of such test is `acosf_test`.
Contributor guide
Research direction
Start with the hermetic FP tests, using acosf_test as the example, and trace how the test C library supplies fma and how its dependency list is assembled. Reproduce the AArch64 soft nofp link failure, then verify that the affected tests link successfully with fma resolved in the expected namespace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100