__sync_-builtins cause undefined references on some sparc targets

Sebastian Huber sebastian.huber@embedded-brains.de
Fri Mar 3 12:35:00 GMT 2017

On 03/03/17 13:23, Eric Botcazou wrote:
>> Is libbacktrace excluded from the build, or is it build but broken?
> Neither, it's presumably falls back to __atomic.  No big deal in any case,
> since you'll presumably never use libbacktrace in practice.

We have (libgcc/config/gthr-rtems.h)

static inline int
__gthread_active_p (void)
   return 1;

and (libgfortran/runtime/backtrace.c)

show_backtrace (bool in_signal_handler)
   struct backtrace_state *lbstate;
   struct mystate state = { 0, false, in_signal_handler };

   lbstate = backtrace_create_state (NULL, __gthread_active_p (),
                     error_callback, NULL);

and (libgfortran/runtime/backtrace.c)

struct backtrace_state *
backtrace_create_state (const char *filename, int threaded,
             backtrace_error_callback error_callback,
             void *data)
   struct backtrace_state init_state;
   struct backtrace_state *state;

   if (threaded)
       error_callback (data, "backtrace library does not support 
threads", 0);
       return NULL;

So, I doubt this works for RTEMS.

I guess libgfortran needs an option to be a bit less verbose on some 

Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

More information about the Gcc mailing list