This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

extern "C" for libstdc++ building


Hi,

I am building a gcc toolchain targeted to my custom kernel. I've added
a thread model for my system to the build and provided a header for
the threading in libgcc/config
In this header I define the minimal necessary gthread functions. Most
of them call out to extern functions which I will then link in when
building a binary.

For example:
#ifdef __cplusplus
extern "C" {
#endif
extern int ebbos_gthread_active_p(void);

static inline int
__gthread_active_p(void)
{
  return ebbos_gthread_active_p();
}

#ifdef __cplusplus
}
#endif

This builds fine, but libstdc++ has mangled symbol names for
ebbos_gthread_active_p while libgcc does not. What can I do to make it
so all the libraries are built with non mangled symbol names? I would
have thought the #ifdef __cplusplus would work, but I seem to be
mistaken.

---
Dan Schatzberg


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]