diff options
author | jakobkummerow <jkummerow@chromium.org> | 2022-06-06 09:32:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-06 09:32:39 -0700 |
commit | b6040f5834c9ab7d52fc257cd65f3384304a73cf (patch) | |
tree | 66f258332ad258b3691b536f38240a46dd49e7c7 /test/lit/help/wasm2js.test | |
parent | 87a27aa30f66622757d4b4acd10c712f4bbb2100 (diff) | |
download | binaryen-b6040f5834c9ab7d52fc257cd65f3384304a73cf.tar.gz binaryen-b6040f5834c9ab7d52fc257cd65f3384304a73cf.tar.bz2 binaryen-b6040f5834c9ab7d52fc257cd65f3384304a73cf.zip |
Fix dynamic linking for non-Debian Linux (#4713)
Line 167 in CMakeLists.txt causes libraries to be put into `/lib`.
Line 110, before this patch, causes binaries to look for libraries in `/${CMAKE_INSTALL_LIBDIR}`. This works out if CMAKE_INSTALL_LIBDIR equals `/lib`, which is the case on non-Linux and on Debian, see https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/GNUInstallDirs.cmake#L221. On non-Debian Linux systems, however, it causes dynamic linking to fail unless `export LD_LIBRARY_PATH=/path/to/binaryen/lib` is manually set in the shell (or a `lib64 ->lib` symlink is created inside the Binaryen checkout). This patch fixes the inconsistency by putting `/lib` as the library search path into the created binaries.
(I suppose an alternative fix would be to update lines 167/168 to use `${CMAKE_INSTALL_LIBDIR}` instead, not sure if that would be preferable.)
Diffstat (limited to 'test/lit/help/wasm2js.test')
0 files changed, 0 insertions, 0 deletions