To add to this I believe libraries by default look within there own directory so for this GOG might not even need to care about configuring -rpath

On Fri, Aug 20, 2021 at 11:05 AM Dean Greer <gcenx83@gmail.com> wrote:
That sounds good to me.

The reason why I’m requesting to not always inject -rpath in the manner is due to 
Bug 49199 to workaround this also requires adding some -rpath configurations directly into LDFLAGS but that’s ugly.

Instead having UNIX_LDFLAGS for example on macOS default to passing the needed -rpath,@loader_path/ and allows adding additional paths after this.

On Fri, Aug 20, 2021 at 11:01 AM Huw Davies <huw@codeweavers.com> wrote:
On Fri, Aug 20, 2021 at 10:13:01AM -0400, Dean Greer wrote:
> This makes sense now thank you, I’d still rather see the -rpath behind
> something like UNIX_LDFLAGS then it could be used for other -rpath
> configuration for the Unix.so libraries 
>
> For the build directory runs wouldn’t it be better to alter the wine loader
> wrapper script.

Right, good idea.  Adding $topdir/dlls/ntdll to DYLD_LIBRARY_PATH in the
wine script will cover the build directory case.

So that leaves the installed case.  The simplest approach would be to
change the install-name to @loader_path/module.so and skip rpaths
entirely.  Is there a reason not to do that?

Huw.