EM_AMDGPU isn't defined on DragonFly, FreeBSD, OpenBSD, so use the
same workaround as ac_rtld.c.
src/amd/common/ac_rgp_elf_object_pack.c:382:24: error: use of undeclared identifier 'EM_AMDGPU'
elf_hdr.e_machine = EM_AMDGPU;
^
Fixes:
110bb2c77dd3 ("ac/rgp: add helper function to write rgp elf oject")
Reviewed-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9169>
#include "ac_rgp.h"
#include "main/macros.h"
+#ifndef EM_AMDGPU
+// Old distributions may not have this enum constant
+#define EM_AMDGPU 224
+#endif
char shader_stage_api_string[6][10] = {
".vertex", /* vertex */