Reason for rpath usage on arm64
cal at macports.org
Tue May 24 17:18:21 UTC 2022
On Tue, May 24, 2022 at 10:01:09AM -0700, Ken Cunningham wrote:
> That comes right from Iain - here's the relevant gcc ticket I believe:
> I'm sure Iain would be delighted to find a way around this.
MacPorts works around this by making a copy of the binary to be
executed, stripping the SIP flag, and transparently running this copy.
Re-using this solution in GCC would additionally require interposing the
execve(2) and posix_spawn(2) syscalls. We have code to do that available
in MacPorts at .
I'm not sure whether Iain would want to port this solution, though. On
the other hand, it has been working reasonably well since 10.11 (except
for a fix recently required to restore it from abysmal performance
because Apple broke their API  and a few resource leak fixes ).
More information about the macports-dev