On 07/24/15 15:51, Ilya Verbin wrote:
On Fri, Jul 24, 2015 at 15:26:38 -0400, Nathan Sidwell wrote:
mber into mkoffload:process () like:
865 fprintf (out, "static const void *target_data[] = {\n"); 866 fprintf (out, " MAGIC, VERSION, ptx_code, (void*) %u, var_mappings, (void*) %u, " 867 "func_mappings\n", nvars, nfuncs); 868 fprintf (out, "};\n\n"); So, libgomp will be able to check target_data in GOMP_offload_register. If MAGIC is present, it can check the VERSION, the plugin also can check the
I do not like this approach. It relies on finding a MAGIC number.
version in a similar way. This hack allows to avoid new versions of GOMP_*_ver in libgomp and GOMP_OFFLOAD_*_ver in plugins.
true, but I don't think that's where the complexity lies. nathan