]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/nvptx/mkoffload.c
Wrap option names in gcc internal messages with %< and %>.
[thirdparty/gcc.git] / gcc / config / nvptx / mkoffload.c
index e99ef3737702a7863935b9f60f23ad6181f6f197..3770f7295af6b18035d2b3833fb9a468671bfaa4 100644 (file)
@@ -1,6 +1,6 @@
 /* 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>.
@@ -27,6 +27,8 @@
    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"
@@ -338,7 +340,7 @@ process (FILE *in, FILE *out)
   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);
@@ -346,7 +348,7 @@ process (FILE *in, FILE *out)
   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);
@@ -452,7 +454,8 @@ main (int argc, char **argv)
 
   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.  */
@@ -485,7 +488,8 @@ main (int argc, char **argv)
        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);