diff options
author | Alex S <iwtcex@gmail.com> | 2021-12-05 19:22:04 +0000 |
---|---|---|
committer | Gerald Pfeifer <gerald@FreeBSD.org> | 2021-12-05 19:45:31 +0000 |
commit | 316c372c7d133c416ced0bd6b1f21fdd011117eb (patch) | |
tree | a61cb76f3513c1555b854b5ddd99417fe74a5472 | |
parent | 48920ed457c8f5bc50c1195bd2bfcf95652369c4 (diff) | |
download | ports-316c372c7d133c416ced0bd6b1f21fdd011117eb.tar.gz ports-316c372c7d133c416ced0bd6b1f21fdd011117eb.zip |
emulators/wine: Use the right libgcc_s for 32-bit on amd64
In our situation, where we leverage 32-bit, i386 executables of Wine
in an amd64 world running 64-bit executables of Wine, the rpath of
$PREFIX/lib/gcc10 which Mk/bsd.gcc.mk sets for the former makes the
dynamic linker attempt to load a 64-bit version of libgcc_s.so which
happens to be at that location on amd64.
Removing this rpath setting at compilation time would be comparatively
more involved, so leverage LD_32_LIBMAP which we are already using in
wine-wow64.sh to point to the system version of libgcc_s.so.
This works since for C code both flavors of libgcc_s.so are fully
compatible and Wine's C++ dependencies Wine (like openal-soft and
various Mesa userspace graphics drivers) are actually compiled with
clang. In other words we are only reverting to the version of the
library they would normally load without rpath interference.
Bump PORTREVISION so new packages with the tweaked script will be
generated.
PR: 259926
Reported by: nc
Tested by: nc
-rw-r--r-- | emulators/wine/Makefile | 1 | ||||
-rw-r--r-- | emulators/wine/files/wine-wow64.sh | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/emulators/wine/Makefile b/emulators/wine/Makefile index fadb124d1105..2a7caa14db94 100644 --- a/emulators/wine/Makefile +++ b/emulators/wine/Makefile @@ -2,6 +2,7 @@ PORTNAME= wine DISTVERSION= 6.0.2 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= emulators MASTER_SITES= SF/${PORTNAME}/Source \ diff --git a/emulators/wine/files/wine-wow64.sh b/emulators/wine/files/wine-wow64.sh index a7b1efba17cc..2ec4cc31703e 100644 --- a/emulators/wine/files/wine-wow64.sh +++ b/emulators/wine/files/wine-wow64.sh @@ -33,6 +33,7 @@ do done export LD_32_LIBRARY_PATH_RPATH=y export LD_32_LIBMAP=" +libgcc_s.so.1 /usr/lib32/libgcc_s.so.1 $LOCALBASE/lib/libvulkan_intel.so $I386_ROOT/$LOCALBASE/lib/libvulkan_intel.so $LOCALBASE/lib/libvulkan_radeon.so $I386_ROOT/$LOCALBASE/lib/libvulkan_radeon.so $LD_32_LIBMAP" |