Commit 852b55f9 by Nathan Sidwell Committed by Nathan Sidwell

mkoffload.c (process): Add C++ protection to emitted code.

	* config/nvptx/mkoffload.c (process): Add C++ protection to
	emitted code.

From-SVN: r225844
parent 58b62eaa
2015-07-15 Nathan Sidwell <nathan@codesourcery.com>
* config/nvptx/mkoffload.c (process): Add C++ protection to
emitted code.
2015-07-14 Michael Meissner <meissner@linux.vnet.ibm.com> 2015-07-14 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/66854 PR target/66854
......
...@@ -867,7 +867,13 @@ process (FILE *in, FILE *out) ...@@ -867,7 +867,13 @@ process (FILE *in, FILE *out)
"func_mappings\n", nvars, nfuncs); "func_mappings\n", nvars, nfuncs);
fprintf (out, "};\n\n"); fprintf (out, "};\n\n");
fprintf (out, "extern void GOMP_offload_register (const void *, int, void *);\n"); fprintf (out, "#ifdef __cplusplus\n"
"extern \"C\" {\n"
"#endif\n");
fprintf (out, "extern void GOMP_offload_register (void *, int, void *);\n");
fprintf (out, "#ifdef __cplusplus\n"
"}\n"
"#endif\n");
fprintf (out, "extern void *__OFFLOAD_TABLE__[];\n\n"); fprintf (out, "extern void *__OFFLOAD_TABLE__[];\n\n");
fprintf (out, "static __attribute__((constructor)) void init (void)\n{\n"); fprintf (out, "static __attribute__((constructor)) void init (void)\n{\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment