[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
This commit is contained in:
Jon Chesterfield 2021-01-12 19:40:02 +00:00
parent bdd1ad5e5c
commit 33e2494bea
1 changed files with 1 additions and 1 deletions

View File

@ -638,7 +638,7 @@ void finiAsyncInfoPtr(__tgt_async_info *async_info_ptr) {
} }
bool elf_machine_id_is_amdgcn(__tgt_device_image *image) { 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); int32_t r = elf_check_machine(image, amdgcnMachineID);
if (!r) { if (!r) {
DP("Supported machine ID not found\n"); DP("Supported machine ID not found\n");