https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110432
--- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> --- <aside> interesting - Apple clang does seem to accept __attribute__((init_priority)) but it still does not actually work **between TUs** unless LTO is engaged. Actually GCC for Darwin could adopt a similar scheme (perhaps we should to be *** compatible). The issue is not whether GCC can do it - it is whether the linker (ld64) honours the ordering information and can generate a new global initialiser (which it seems still not to). AFAIR upstream clang rejects the attribute for Darwin. </aside> @Jonathan is there a patch for that proposed solution?