diff options
Diffstat (limited to 'gcc/config/nvptx')
-rw-r--r-- | gcc/config/nvptx/mkoffload.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/config/nvptx/mkoffload.c b/gcc/config/nvptx/mkoffload.c index 38ccdba5de6..8f359cfdb7b 100644 --- a/gcc/config/nvptx/mkoffload.c +++ b/gcc/config/nvptx/mkoffload.c @@ -35,6 +35,7 @@ #include "obstack.h" #include "diagnostic-core.h" #include "collect-utils.h" +#include "gomp-constants.h" const char tool_name[] = "nvptx mkoffload"; @@ -791,9 +792,9 @@ process (FILE *in, FILE *out) fprintf (out, "extern void GOMP_offload_register (const void *, int, void *);\n"); fprintf (out, "extern void *__OPENMP_TARGET__[];\n\n"); - fprintf (out, "#define PTX_ID 1\n"); fprintf (out, "static __attribute__((constructor)) void init (void)\n{\n"); - fprintf (out, " GOMP_offload_register (__OPENMP_TARGET__, PTX_ID,\n"); + fprintf (out, " GOMP_offload_register (__OPENMP_TARGET__, %d,\n", + GOMP_DEVICE_NVIDIA_PTX); fprintf (out, " &target_data);\n"); fprintf (out, "};\n"); } |