[Openmp-commits] [PATCH] D107661: [libomptarget][amdgpu] don't declare Elf_Note on FreeBSD

Dimitry Andric via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Aug 6 12:46:07 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG71ae2e0221a9: [libomptarget][amdgpu] don't declare Elf_Note on FreeBSD (authored by dim).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107661/new/

https://reviews.llvm.org/D107661

Files:
  openmp/libomptarget/plugins/amdgpu/impl/system.cpp


Index: openmp/libomptarget/plugins/amdgpu/impl/system.cpp
===================================================================
--- openmp/libomptarget/plugins/amdgpu/impl/system.cpp
+++ openmp/libomptarget/plugins/amdgpu/impl/system.cpp
@@ -35,6 +35,8 @@
 /*
  * Note descriptors.
  */
+// FreeBSD already declares Elf_Note (indirectly via <libelf.h>)
+#if !defined(__FreeBSD__)
 typedef struct {
   uint32_t n_namesz; /* Length of note's name. */
   uint32_t n_descsz; /* Length of note's value. */
@@ -43,6 +45,7 @@
   // then padding, optional
   // then desc, at 4 byte alignment (not 8, despite being elf64)
 } Elf_Note;
+#endif
 
 // The following include file and following structs/enums
 // have been replicated on a per-use basis below. For example,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107661.364872.patch
Type: text/x-patch
Size: 758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210806/bb0c83a3/attachment.bin>


More information about the Openmp-commits mailing list