]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PR target/67822] OpenMP offloading to nvptx fails
authortschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Oct 2015 19:27:30 +0000 (19:27 +0000)
committertschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Oct 2015 19:27:30 +0000 (19:27 +0000)
gcc/
PR target/67822
* config/nvptx/mkoffload.c (main): Scan the argument vector for
-fopenmp, and skip generating an offloading image if specified.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228414 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/nvptx/mkoffload.c

index 3f7561a0c57a225204f66ae049774338563d8289..1317a2d6d5e76d59c6c9dfc21452df118469574d 100644 (file)
@@ -1,3 +1,9 @@
+2015-10-02  Thomas Schwinge  <thomas@codesourcery.com>
+
+       PR target/67822
+       * config/nvptx/mkoffload.c (main): Scan the argument vector for
+       -fopenmp, and skip generating an offloading image if specified.
+
 2015-10-02  Uros Bizjak  <ubizjak@gmail.com>
 
        * system.h (ROUND_UP): New macro definition.
index 926c82beea9ec347a96e0a1d02bcd41f08a30ec0..69eb4eac4156c8726237d67a41630f720ce456d0 100644 (file)
@@ -1030,6 +1030,7 @@ main (int argc, char **argv)
   expandargv (&argc, &argv);
 
   /* Scan the argument vector.  */
+  bool fopenmp = false;
   for (int i = 1; i < argc; i++)
     {
 #define STR "-foffload-abi="
@@ -1044,6 +1045,8 @@ main (int argc, char **argv)
                         "unrecognizable argument of option " STR);
        }
 #undef STR
+      else if (strcmp (argv[i], "-fopenmp") == 0)
+       fopenmp = true;
       else if (strcmp (argv[i], "-v") == 0)
        verbose = true;
     }
@@ -1082,8 +1085,8 @@ main (int argc, char **argv)
     fatal_error (input_location, "cannot open '%s'", ptx_cfile_name);
 
   /* PR libgomp/65099: Currently, we only support offloading in 64-bit
-     configurations.  */
-  if (offload_abi == OFFLOAD_ABI_LP64)
+     configurations.  PR target/67822: OpenMP offloading to nvptx fails.  */
+  if (offload_abi == OFFLOAD_ABI_LP64 && !fopenmp)
     {
       ptx_name = make_temp_file (".mkoffload");
       obstack_ptr_grow (&argv_obstack, "-o");