From 9584e638ca38d3748068871cfc3ae3454021ebe2 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 11 Feb 2015 15:15:38 +0100 Subject: [PATCH] nvptx mkoffload: __OPENMP_TARGET__ -> __OFFLOAD_TABLE__. gcc/ * config/nvptx/mkoffload.c (process): Refer to __OFFLOAD_TABLE__ instead of __OPENMP_TARGET__. From-SVN: r220620 --- gcc/ChangeLog | 3 +++ gcc/config/nvptx/mkoffload.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1479dcb..bc4a050 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2015-02-11 Thomas Schwinge + * config/nvptx/mkoffload.c (process): Refer to __OFFLOAD_TABLE__ + instead of __OPENMP_TARGET__. + * config/nvptx/mkoffload.c: Include "gomp-constants.h". (process): Use its GOMP_DEVICE_NVIDIA_PTX instead of (wrongly) hard-coding PTX_ID. diff --git a/gcc/config/nvptx/mkoffload.c b/gcc/config/nvptx/mkoffload.c index 8f359cf..2287316 100644 --- a/gcc/config/nvptx/mkoffload.c +++ b/gcc/config/nvptx/mkoffload.c @@ -791,9 +791,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, "extern void *__OFFLOAD_TABLE__[];\n\n"); fprintf (out, "static __attribute__((constructor)) void init (void)\n{\n"); - fprintf (out, " GOMP_offload_register (__OPENMP_TARGET__, %d,\n", + fprintf (out, " GOMP_offload_register (__OFFLOAD_TABLE__, %d,\n", GOMP_DEVICE_NVIDIA_PTX); fprintf (out, " &target_data);\n"); fprintf (out, "};\n"); -- 2.7.4