https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110432
--- Comment #10 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Patrick Palka from comment #9) > (In reply to Jonathan Wakely from comment #1) > > Patrick, we talked about this and IIRC your suggestion was to move the > > __has_attribute check into configure, so that it depends on GCC, not on > > whichever compiler happens to include <iostream> later. > > Yes, sorry for letting this issue slip through the cracks. It makes sense > to fix this by simply disabling the <iostream> optimization on macOS as you > suggested, and perhaps worry about a configure-time check only if it turns > out another platform hits this issue. do all the other (I guess non-embedded) platforms now have init priority support? (I think maybe something was added to AIX recently, and I suppose that Solaris when using bfd ld, at least would). the solution is a reasonable band-aid (given that a patch to make init priority work on Darwin is some way in the future).