macos: fix relocating universal binaries

The process for relocating a universal binary involves copying the original single architecture binaries to a temporary directory without preserving the directory layout. The merge of some resources (libraries, executables) depends on where exactly the binary is located in order to correctly compute the rpath for the file. This is incompatible.

Fix by passing to the relocation and rpath handling code, the path to the original binary so that rpath computation can be performed on that file location instead.

Edited by Matthew Waters

Merge request reports