[PR target/67822] OpenMP offloading to nvptx fails
gcc/ PR target/67822 * config/nvptx/mkoffload.c (main): Scan the argument vector for -fopenmp, and skip generating an offloading image if specified. From-SVN: r228414
This commit is contained in:
parent
54070b5155
commit
d4852cd492
@ -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>
|
2015-10-02 Uros Bizjak <ubizjak@gmail.com>
|
||||||
|
|
||||||
* system.h (ROUND_UP): New macro definition.
|
* system.h (ROUND_UP): New macro definition.
|
||||||
|
@ -1030,6 +1030,7 @@ main (int argc, char **argv)
|
|||||||
expandargv (&argc, &argv);
|
expandargv (&argc, &argv);
|
||||||
|
|
||||||
/* Scan the argument vector. */
|
/* Scan the argument vector. */
|
||||||
|
bool fopenmp = false;
|
||||||
for (int i = 1; i < argc; i++)
|
for (int i = 1; i < argc; i++)
|
||||||
{
|
{
|
||||||
#define STR "-foffload-abi="
|
#define STR "-foffload-abi="
|
||||||
@ -1044,6 +1045,8 @@ main (int argc, char **argv)
|
|||||||
"unrecognizable argument of option " STR);
|
"unrecognizable argument of option " STR);
|
||||||
}
|
}
|
||||||
#undef STR
|
#undef STR
|
||||||
|
else if (strcmp (argv[i], "-fopenmp") == 0)
|
||||||
|
fopenmp = true;
|
||||||
else if (strcmp (argv[i], "-v") == 0)
|
else if (strcmp (argv[i], "-v") == 0)
|
||||||
verbose = true;
|
verbose = true;
|
||||||
}
|
}
|
||||||
@ -1082,8 +1085,8 @@ main (int argc, char **argv)
|
|||||||
fatal_error (input_location, "cannot open '%s'", ptx_cfile_name);
|
fatal_error (input_location, "cannot open '%s'", ptx_cfile_name);
|
||||||
|
|
||||||
/* PR libgomp/65099: Currently, we only support offloading in 64-bit
|
/* PR libgomp/65099: Currently, we only support offloading in 64-bit
|
||||||
configurations. */
|
configurations. PR target/67822: OpenMP offloading to nvptx fails. */
|
||||||
if (offload_abi == OFFLOAD_ABI_LP64)
|
if (offload_abi == OFFLOAD_ABI_LP64 && !fopenmp)
|
||||||
{
|
{
|
||||||
ptx_name = make_temp_file (".mkoffload");
|
ptx_name = make_temp_file (".mkoffload");
|
||||||
obstack_ptr_grow (&argv_obstack, "-o");
|
obstack_ptr_grow (&argv_obstack, "-o");
|
||||||
|
Loading…
Reference in New Issue
Block a user