about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJohannes Schauer Marin Rodrigues <josch@mister-muffin.de>2023-07-23 13:54:35 +0200
committerJohannes Schauer Marin Rodrigues <josch@mister-muffin.de>2023-07-23 13:54:35 +0200
commit879c2f365e28178c284f05afbf0ff9fff334bcb6 (patch)
treead6d63d6a8dc438d282c56993d2ed56267eb3814
parent50032affcf022e8e3259324e1a159b51424ef935 (diff)
downloadbox64-879c2f365e28178c284f05afbf0ff9fff334bcb6.tar.gz
box64-879c2f365e28178c284f05afbf0ff9fff334bcb6.zip
add /usr/x86_64-linux-gnu/lib to the shared library search path
On Debian there are the packages libstdc++6-amd64-cross and
libgcc-s1-amd64-cross which provide amd64 shared libraries which are
usually used for cross compiling without multiarch but using a sysroot
prefix instead. Since libgcc_s.so.1 and libstdc++.so.6 shipped by these
packages are fully functional, let box64 use them as a fallback if it
cannot find them in the other paths that it searched before.
-rw-r--r--src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index be0cca39..14e04d11 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1027,6 +1027,8 @@ void LoadEnvVars(box64context_t *context)
         AddPath("/lib/x86_64-linux-gnu", &context->box64_ld_lib, 1);
     if(FileExist("/usr/lib/x86_64-linux-gnu", 0))
         AddPath("/usr/lib/x86_64-linux-gnu", &context->box64_ld_lib, 1);
+    if(FileExist("/usr/x86_64-linux-gnu/lib", 0))
+        AddPath("/usr/x86_64-linux-gnu/lib", &context->box64_ld_lib, 1);
     if(getenv("LD_LIBRARY_PATH"))
         PrependList(&context->box64_ld_lib, getenv("LD_LIBRARY_PATH"), 1);   // in case some of the path are for x86 world
     if(getenv("BOX64_EMULATED_LIBS")) {