Using TinyCC to compile binutils fails in 2.39+

Alan Modra amodra@gmail.com
Thu May 29 23:27:41 GMT 2025
On Thu, May 29, 2025 at 11:25:58AM +0000, Ludvig Christensen wrote:
> > I think we have a bug here.  I'm guessing your bfd/config.h has
> > #undef TLS
> 
> 
> It seems to not be the case.
> After configure, bfd/config.h has
> 
> /* #undef TLS */

Yes, that's what I meant.  I'll leave committing the fairly obvious
fix to Tom, because he may want to tweak _bfd_threading_enabled (or
other other parts of the threading interfaace for gdb) at the same
time.

> 
> However, the issue could be me using TCC as a drop-in replacement in binutils root configure with:
> ./configure CC=tcc
> 
> 
> Kind regards,
> Ludvig
> 
> ________________________________
> From: Alan Modra <amodra@gmail.com>
> Sent: 29 May 2025 12:15:51
> To: Ludvig Christensen
> Cc: Andrew Pinski; binutils@sourceware.org
> Subject: Re: Using TinyCC to compile binutils fails in 2.39+
> 
> On Thu, May 29, 2025 at 08:08:05AM +0000, Ludvig Christensen via Binutils wrote:
> > When compiling:
> >
> > bfd/bfd.c:733: error: ';' expected (got "bfd_error_type")
> >
> > Caused by:
> > static TLS bfd_error_type bfd_error;
> >
> > I believe it can be traced back to when running ./configure:
> > checking for thread local storage (TLS) class... none
> 
> I think we have a bug here.  I'm guessing your bfd/config.h has
> #undef TLS
> 
> If that's the case then we ought to have
> 
> #ifndef TLS
> #define TLS
> #endif
> 
> before uses of TLS in bfd.c

-- 
Alan Modra


More information about the Binutils mailing list