[Openmp-commits] [openmp] 33e2494 - [libomptarget][amdgpu][nfc] Fix build on centos

Jon Chesterfield via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 12 11:40:21 PST 2021


Author: Jon Chesterfield
Date: 2021-01-12T19:40:03Z
New Revision: 33e2494bea653a845cb0502cc6d3cecdf2b47750

URL: https://github.com/llvm/llvm-project/commit/33e2494bea653a845cb0502cc6d3cecdf2b47750
DIFF: https://github.com/llvm/llvm-project/commit/33e2494bea653a845cb0502cc6d3cecdf2b47750.diff

LOG: [libomptarget][amdgpu][nfc] Fix build on centos

[libomptarget][amdgpu][nfc] Fix build on centos

rtl.cpp replaced 224 with a #define from elf.h, but that
doesn't work on a centos 7 build machine with an old elf.h

Reviewed By: ronlieb

Differential Revision: https://reviews.llvm.org/D94528

Added: 
    

Modified: 
    openmp/libomptarget/plugins/amdgpu/src/rtl.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
index 437846f8b15b8..bd450f9898faf 100644
--- a/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
+++ b/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
@@ -638,7 +638,7 @@ void finiAsyncInfoPtr(__tgt_async_info *async_info_ptr) {
 }
 
 bool elf_machine_id_is_amdgcn(__tgt_device_image *image) {
-  const uint16_t amdgcnMachineID = EM_AMDGPU;
+  const uint16_t amdgcnMachineID = 224; // EM_AMDGPU may not be in system elf.h
   int32_t r = elf_check_machine(image, amdgcnMachineID);
   if (!r) {
     DP("Supported machine ID not found\n");


        


More information about the Openmp-commits mailing list