Hi Jakub, > On Wed, Dec 16, 2020 at 10:20:09AM +0100, Martin Liška wrote: >> So vec_mem_desc is not initialized before a static member in module.cc. >> We can fix it by using constructor attribute. [...] >> + of all static variables. */ >> + >> +static void >> +__attribute__((constructor (101))) > > I think this needs to be guarded based on which compiler is used to compile > GCC. Perhaps we could say that we don't support > --enable-gather-detailed-mem-stats when the compiler isn't built by GCC (or > other compiler that supports the constructor attribute) and #error on that.
not only that: if a target doesn't support constructor priorities (like Solaris 11.3, unlike 11.4), this makes gcc error out. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University