https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890
--- Comment #22 from Richard Henderson <rth at gcc dot gnu.org> --- I believe that Honza is over-thinking this in #c12. Mike reports that the patch in #c9 works, which makes sense to me based on where darwin emits its profiler call. The patch could be improved to note the darwin-specific nature of the patch. E.g. (TARGET_MACHO && crtl->profile) but otherwise I think it's fine.