/* Offload image generation tool for PTX.
- Copyright (C) 2014-2016 Free Software Foundation, Inc.
+ Copyright (C) 2014-2019 Free Software Foundation, Inc.
Contributed by Nathan Sidwell <nathan@codesourcery.com> and
Bernd Schmidt <bernds@codesourcery.com>.
This is not a complete assembler. We presume the source is well
formed from the compiler and can die horribly if it is not. */
+#define IN_TARGET_CODE 1
+
#include "config.h"
#include "system.h"
#include "coretypes.h"
fprintf (out, "static __attribute__((constructor)) void init (void)\n"
"{\n"
" GOMP_offload_register_ver (%#x, __OFFLOAD_TABLE__,"
- "%d/*NVIDIA_PTX*/, &target_data);\n"
+ " %d/*NVIDIA_PTX*/, &target_data);\n"
"};\n",
GOMP_VERSION_PACK (GOMP_VERSION, GOMP_VERSION_NVIDIA_PTX),
GOMP_DEVICE_NVIDIA_PTX);
fprintf (out, "static __attribute__((destructor)) void fini (void)\n"
"{\n"
" GOMP_offload_unregister_ver (%#x, __OFFLOAD_TABLE__,"
- "%d/*NVIDIA_PTX*/, &target_data);\n"
+ " %d/*NVIDIA_PTX*/, &target_data);\n"
"};\n",
GOMP_VERSION_PACK (GOMP_VERSION, GOMP_VERSION_NVIDIA_PTX),
GOMP_DEVICE_NVIDIA_PTX);
if (!found)
fatal_error (input_location,
- "offload compiler %s not found", GCC_INSTALL_NAME);
+ "offload compiler %s not found (consider using '-B')",
+ GCC_INSTALL_NAME);
/* We may be called with all the arguments stored in some file and
passed with @file. Expand them into argv before processing. */
verbose = true;
}
if (!(fopenacc ^ fopenmp))
- fatal_error (input_location, "either -fopenacc or -fopenmp must be set");
+ fatal_error (input_location, "either %<-fopenacc%> or %<-fopenmp%> "
+ "must be set");
struct obstack argv_obstack;
obstack_init (&argv_obstack);