mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-29 02:24:58 +08:00
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
This commit is contained in:
parent
09f532c97b
commit
664041e68b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user