Commit 7b27e60e authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

makefiles: On macOS, use @rpath instead of @loader_path when building Unix libs.

Fixes launching 32-bit EXEs from a WOW64 build dir. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52618Signed-off-by: 's avatarBrendan Shanks <bshanks@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent d8937c07
......@@ -10042,7 +10042,7 @@ fi
LIBS="$ac_save_LIBS"
fi
UNIXLDFLAGS="-dynamiclib -install_name @loader_path/\$(UNIXLIB)"
UNIXLDFLAGS="-dynamiclib -install_name @rpath/\$(UNIXLIB) -Wl,-rpath,@loader_path\/"
LIBWINE_SHAREDLIB="libwine.$libwine_version.dylib"
LIBWINE_LDFLAGS="-dynamiclib -install_name @rpath/libwine.$libwine_soversion.dylib -Wl,-rpath,@loader_path/ -compatibility_version $libwine_soversion -current_version $libwine_version"
......
......@@ -773,7 +773,7 @@ case $host_os in
LIBS="$ac_save_LIBS"
fi
UNIXLDFLAGS="-dynamiclib -install_name @loader_path/\$(UNIXLIB)"
UNIXLDFLAGS="-dynamiclib -install_name @rpath/\$(UNIXLIB) -Wl,-rpath,@loader_path\/"
AC_SUBST(LIBWINE_SHAREDLIB,"libwine.$libwine_version.dylib")
AC_SUBST(LIBWINE_LDFLAGS,["-dynamiclib -install_name @rpath/libwine.$libwine_soversion.dylib -Wl,-rpath,@loader_path/ -compatibility_version $libwine_soversion -current_version $libwine_version"])
AC_SUBST(WINELOADER_DEPENDS,"wine_info.plist")
......
......@@ -416,7 +416,8 @@ static struct strarray get_link_args( struct options *opts, const char *output_n
if (opts->unix_lib)
{
strarray_add( &flags, "-install_name" );
strarray_add( &flags, strmake( "@loader_path/%s.so", output_name ) );
strarray_add( &flags, strmake( "@rpath/%s.so", output_name ) );
strarray_add( &flags, "-Wl,-rpath,@loader_path/" );
}
strarray_addall( &link_args, flags );
return link_args;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment