src/mdw-cross.in: Add the cross-built libraries to the runtime search path.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 15 Nov 2019 17:12:27 +0000 (17:12 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 10 May 2020 18:35:19 +0000 (19:35 +0100)
Libtool sets the `RPATH' in binaries, but libraries linked using plain
`ld' don't by default, and then there is sadness.

src/cross.in

index 38d3136..8953c52 100644 (file)
@@ -65,4 +65,7 @@ case ${CROSS_COMPILER-guess},$found_gcc,$found_clang in
 esac
 export CROSS_COMPILER
 
+LD_LIBRARY_PATH="$CROSS_PREFIX/lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
+export LD_LIBRARY_PATH
+
 exec "$@"