https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110432

--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Sascha Scandella from comment #4)
> I found also this issue regarding init_priority:
> https://github.com/llvm/llvm-project/issues/15363

So that is the intentional behaviour (upstream clang definitely used to reject
it) - as noted it actually works fine with LTO too (or within one module if
not).

I was investigating whether we could do the work in collect2, but that gets
quite complex when considering the interactions between LTO and non-LTO
objects.

For now, IMO, we should adopt a fix of the nature Jonathan suggests and then it
will "just work" if/when we get init prio on Darwin.

in slower time, we might consider the option of following clang's behaviour for
Darwin (possibly with a warning about the does-not-work-between-tus).

Reply via email to