This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Fix build on older FreeBSD
ClosedPublic

Authored by brooks on Mar 30 2023, 11:14 PM.

Details

Summary

Commit 392d9eb03af5a1adac66a86939351b22b3e73495 added a dependency on
FPE_FLTIDO which was only defined in FreeBSD main on May 19, 2022 and it
not in all releases. Just define it if it's missing.

Diff Detail

Event Timeline

brooks created this revision.Mar 30 2023, 11:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2023, 11:14 PM
Herald added a subscriber: krytarowski. · View Herald Transcript
brooks requested review of this revision.Mar 30 2023, 11:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2023, 11:14 PM
dim accepted this revision.Mar 31 2023, 1:39 AM

LGTM, but if such SIGFPE's occur before the FPE_FLTIDO define was introduced, can they ever have value 9?

This revision is now accepted and ready to land.Mar 31 2023, 1:39 AM
emaste accepted this revision.Mar 31 2023, 6:59 AM

LGTM, but if such SIGFPE's occur before the FPE_FLTIDO define was introduced, can they ever have value 9?

This is essentially a compile-time assertion to make sure we have the correct value for FPE_FLTIDO. If we're building on an older FreeBSD which does not have it defined then we can't check it anyway.

We could run an LLDB built on older FreeBSD on a newer kernel and receive FPE_FLTIDO I imagine.

This revision was automatically updated to reflect the committed changes.