Using TinyCC to compile binutils fails in 2.39+
Ludvig Christensen
ludvigch@kth.se
Thu May 29 08:08:05 GMT 2025
Hi, thanks for the reply.
> What macro does tinyCC define for x86_64? or rather the target it is
> being compiled for?
> Maybe it should have been __x86_64__ instead of the current __x86_64 .
Confirmed tinyCC to support __x86_64__ :)
> line of which file? Because I can't figure it out.
My bad, I missed adding some info. It's in binutils-2.42/bfd/bfd.c line 733-736.
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
Looking into it further it seems tinyCC doesn't support TLS without workarounds being the issue.
Kind regards,
Ludvig
________________________________
From: Andrew Pinski <pinskia@gmail.com>
Sent: 28 May 2025 23:54:07
To: Ludvig Christensen
Cc: binutils@sourceware.org
Subject: Re: Using TinyCC to compile binutils fails in 2.39+
On Wed, May 28, 2025 at 11:32 AM Ludvig Christensen via Binutils
<binutils@sourceware.org> wrote:
>
> Hi,
>
> I have been using TinyCC to compile binutils and just wanted to drop an FYI:
>
> - 2.38 is successfully compiled using TinyCC
>
> - 2.39-2.41: TinyCC fail because of GNU C macros in 'gprofng/common/gp-defs.h' Lines 42-50
Those macros are required by the ABI (C extension or full ABI) of each
of those targets.
What macro does tinyCC define for x86_64? or rather the target it is
being compiled for?
Maybe it should have been __x86_64__ instead of the current __x86_64 .
>
> - 2.42-2.44: TinyCC fail to recognise the TLS macro on line 733-736
line of which file? Because I can't figure it out.
I can only find __thread in one place:
gprofng/libcollector/heaptrace.c which I suspect could be changed to
_Thread_local since C11 is common enough.
Thanks,
Andrew
>
>
> I am unsure if it is of interest to support TinyCC but thought I'd let you guys know in case it is.
>
>
> Kind regards,
> Ludvig
>
> ________________________________
>
> 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.
________________________________
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/77fcddd8/attachment.htm>
More information about the Binutils
mailing list