This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][cmake] Ensure linking against libm for Linux
ClosedPublic

Authored by telans on Feb 15 2022, 3:33 AM.

Details

Reviewers
jdoerfert
MaskRay
Summary

Do the same is as done for NetBSD. Compiling libomp with Clang uses fmaxl.
Downstream report: https://bugs.gentoo.org/816831

Fixes: https://github.com/llvm/llvm-project/issues/51457

Diff Detail

Event Timeline

telans created this revision.Feb 15 2022, 3:33 AM
telans requested review of this revision.Feb 15 2022, 3:33 AM
Herald added a project: Restricted Project. · View Herald Transcript
MaskRay accepted this revision.EditedFeb 24 2022, 3:14 PM
MaskRay added a subscriber: MaskRay.

Compiling libomp with Clang uses fmaxl.

Some compiler-rt/lib/builtins files call libm functions (e.g. fmaxl, fabs). Linking libomp with --rtlib=compiler-rt references these functions.

After D91841 (@rprichard , compiler-rt/lib/builtins still references fmaxl (x86 fp80) and fabs.

This revision is now accepted and ready to land.Feb 24 2022, 3:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 5 2022, 8:21 PM