This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget][amdgpu] don't declare Elf_Note on FreeBSD
ClosedPublic

Authored by dim on Aug 6 2021, 12:09 PM.

Details

Summary

On FreeBSD, the system <libelf.h> already declares struct Elf_Note
indirectly (via <sys/elf_common.h>). This results in compile errors
when building the libomptarget amdgpu plugin. Avoid redeclaring `struct
Elf_Note` on FreeBSD to fix the errors.

Diff Detail

Event Timeline

dim created this revision.Aug 6 2021, 12:09 PM
dim requested review of this revision.Aug 6 2021, 12:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2021, 12:09 PM
Herald added a subscriber: wdng. · View Herald Transcript
JonChesterfield accepted this revision.Aug 6 2021, 12:30 PM

Thank you for the patch! I haven't been compiling this on a bsd.

Adding it to the list of reasons to replace libelf with the llvm elf headers within this plugin

This revision is now accepted and ready to land.Aug 6 2021, 12:30 PM
This revision was landed with ongoing or failed builds.Aug 6 2021, 12:46 PM
This revision was automatically updated to reflect the committed changes.