[gomp4 2/8] nvptx mkoffload: do not restrict to OpenACC

Alexander Monakov amonakov@ispras.ru
Wed Sep 23 17:22:00 GMT 2015


This patch allows to meaningfully invoke mkoffload with -fopenmp.  The check
for -fopenacc flag is specific to gomp4 branch: trunk does not have it.

	* config/nvptx/mkoffload.c (main): Do not check for -fopenacc.
---
 gcc/config/nvptx/mkoffload.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/gcc/config/nvptx/mkoffload.c b/gcc/config/nvptx/mkoffload.c
index 0114394..8c15686 100644
--- a/gcc/config/nvptx/mkoffload.c
+++ b/gcc/config/nvptx/mkoffload.c
@@ -468,15 +468,12 @@ main (int argc, char **argv)
       obstack_ptr_grow (&argv_obstack, str);
     }
 
-  bool fopenacc = false;
   for (int ix = 1; ix != argc; ix++)
     {
       if (!strcmp (argv[ix], "-v"))
 	verbose = true;
       else if (!strcmp (argv[ix], "-save-temps"))
 	save_temps = true;
-      else if (!strcmp (argv[ix], "-fopenacc"))
-	fopenacc = true;
 
       if (!strcmp (argv[ix], "-o") && ix + 1 != argc)
 	outname = argv[++ix];
@@ -491,8 +488,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, and only for OpenACC offloading.  */
-  if (!target_ilp32 && fopenacc)
+     configurations.  */
+  if (!target_ilp32)
     {
       ptx_name = make_temp_file (".mkoffload");
       obstack_ptr_grow (&argv_obstack, "-o");



More information about the Gcc-patches mailing list