Re: [Tinycc-devel] __attribute__((constructor)) not getting called

2022-10-05 Thread Michael Matz
Hello, On Sat, 1 Oct 2022, Liam Wilson wrote: Note __attribute__((constructor)) has been stripped off bar and not foo. Yep, that's the glibc headers defining __attribute__ away ... Digging a bit further, it seems to be due to sys/cdefs.h (which is included by string.h and many other

Re: [Tinycc-devel] __attribute__((constructor)) not getting called

2022-10-04 Thread Liam Wilson
On Tue, 4 Oct 2022 at 14:32, Steffen Nurpmeso wrote: > Somehow interesting that such a huge API does not offer macros to > hide the declspec from module implementors. > But great! (That is how i would have done it, and it worked > twenty years ago.) I think it has NAPI_MODULE_EXPORT for that

Re: [Tinycc-devel] __attribute__((constructor)) not getting called

2022-10-04 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20221004135109.h5zfu%stef...@sdaoden.eu>: |Liam Wilson wrote in | : ||On Sat, 1 Oct 2022 at 18:27, Liam Wilson wrote: ||> On Sat, 1 Oct 2022 at 17:00, Steffen Nurpmeso \ ||> wrote: ||>> Liam Wilson wrote in ||>> : ||>> ... ||>>|I've been attempting to build

Re: [Tinycc-devel] __attribute__((constructor)) not getting called

2022-10-04 Thread Steffen Nurpmeso
Liam Wilson wrote in : |On Sat, 1 Oct 2022 at 18:27, Liam Wilson wrote: |> |> On Sat, 1 Oct 2022 at 17:00, Steffen Nurpmeso wrote: |>> |>> Liam Wilson wrote in |>> : |>> ... |>>|I've been attempting to build nodejs Node-API addons using the tiny c |>>|compiler. When doing this I

Re: [Tinycc-devel] __attribute__((constructor)) not getting called

2022-10-03 Thread Liam Wilson
On Sat, 1 Oct 2022 at 18:27, Liam Wilson wrote: > > On Sat, 1 Oct 2022 at 17:00, Steffen Nurpmeso wrote: > > > > Liam Wilson wrote in > > : > > ... > > |I've been attempting to build nodejs Node-API addons using the tiny c > > |compiler. When doing this I noticed that the addons were failing

Re: [Tinycc-devel] __attribute__((constructor)) not getting called

2022-10-01 Thread Steffen Nurpmeso
Liam Wilson wrote in : |On Sat, 1 Oct 2022 at 17:00, Steffen Nurpmeso wrote: |> Liam Wilson wrote in |> : |> ... |>|I've been attempting to build nodejs Node-API addons using the tiny c |>|compiler. When doing this I noticed that the addons were failing to |>|self register on load in

Re: [Tinycc-devel] __attribute__((constructor)) not getting called

2022-10-01 Thread Liam Wilson
On Sat, 1 Oct 2022 at 17:00, Steffen Nurpmeso wrote: > > Liam Wilson wrote in > : > ... > |I've been attempting to build nodejs Node-API addons using the tiny c > |compiler. When doing this I noticed that the addons were failing to > |self register on load in nodejs as the constructors were

Re: [Tinycc-devel] __attribute__((constructor)) not getting called

2022-10-01 Thread Steffen Nurpmeso
Liam Wilson wrote in : ... |I've been attempting to build nodejs Node-API addons using the tiny c |compiler. When doing this I noticed that the addons were failing to |self register on load in nodejs as the constructors were failing to |run. gcc worked fine, but tcc failed. Node-API addons

[Tinycc-devel] __attribute__((constructor)) not getting called

2022-10-01 Thread Liam Wilson
Hi, I've been attempting to build nodejs Node-API addons using the tiny c compiler. When doing this I noticed that the addons were failing to self register on load in nodejs as the constructors were failing to run. gcc worked fine, but tcc failed. Node-API addons use __attribute__((constructor))