diff options
| author | Johannes Schauer Marin Rodrigues <josch@mister-muffin.de> | 2023-07-23 13:54:35 +0200 |
|---|---|---|
| committer | Johannes Schauer Marin Rodrigues <josch@mister-muffin.de> | 2023-07-23 13:54:35 +0200 |
| commit | 879c2f365e28178c284f05afbf0ff9fff334bcb6 (patch) | |
| tree | ad6d63d6a8dc438d282c56993d2ed56267eb3814 /src/main.c | |
| parent | 50032affcf022e8e3259324e1a159b51424ef935 (diff) | |
| download | box64-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.
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 2 |
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")) { |