This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Define ElfW() macro if it's not defined
ClosedPublic

Authored by broadwaylamb on Mar 10 2020, 4:48 AM.

Details

Summary

The ElfW() macro is not provided by <link.h> on some
systems (e.g., FreeBSD). On these systems the data structures are
just called Elf_XXX. Define ElfW() locally.

(This fix is taken from libunwind.)

Diff Detail

Event Timeline

broadwaylamb created this revision.Mar 10 2020, 4:48 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 10 2020, 4:48 AM
Herald added subscribers: llvm-commits, Restricted Project, krytarowski and 3 others. · View Herald Transcript
compnerd accepted this revision.Mar 10 2020, 8:14 AM

*sigh* ELF, couldn't you just add that macro to the standard? (We have something similar in libunwind to deal with this). LGTM

This revision is now accepted and ready to land.Mar 10 2020, 8:14 AM
This revision was automatically updated to reflect the committed changes.