Re: extern "C" for libstdc++ building

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12 September 2012 14:50, Dan Schatzberg wrote:
> 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.

That should work.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux