Using TinyCC to compile binutils fails in 2.39+

Ludvig Christensen ludvigch@kth.se
Thu May 29 11:25:58 GMT 2025


Hi,


> 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 */


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
________________________________

Observera att avs?ndaren inte ?r anst?lld vid Kungliga Tekniska h?gskolan. KTH ansvarar inte f?r ?sikter, p?st?enden eller personuppgifter som f?rmedlas i detta meddelande.

Please note that the sender is not employed by KTH Royal Institute of Technology. KTH is not responsible for the opinions, claims or personal data conveyed in this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20250529/468dac75/attachment.htm>


More information about the Binutils mailing list