Reason for rpath usage on arm64

Clemens Lang cal at
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.
See [1].

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 [2].

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 [3] and a few resource leak fixes [4]).



More information about the macports-dev mailing list