Commit 664041e6 by Brendan Kehoe

collect2.c (write_c_file): Wrap the ctor/dtor lists and fns with `extern "C" { ...

	* collect2.c (write_c_file): Wrap the ctor/dtor lists and fns with
	`extern "C" { ... }', to avoid having the fn names mangled with
	the C++ driver.

From-SVN: r13288
parent 09f532c9
......@@ -1789,12 +1789,14 @@ write_c_file (stream, name)
FILE *stream;
char *name;
{
fprintf (stream, "#ifdef __cplusplus\nextern \"C\" {\n#endif\n");
#ifndef LD_INIT_SWITCH
if (! shared_obj)
write_c_file_glob (stream, name);
else
#endif
write_c_file_stat (stream, name);
fprintf (stream, "#ifdef __cplusplus\n}\n#endif\n");
}
static void
......
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