Build OpenSSL with RPATH?

My question is how to configure the build in a way, that it can hardcode all binary and library dependencies of shared libraries without using LD_LIBRARY_PATH, or anything like that. OpenSSL supports RPATH‘s out of the box for BSD targets (but not others). From Configure: # Unlike other OSes (like Solaris, Linux, Tru64, IRIX) BSD … Read more

How to stop MinGW and MSYS from mangling path names given at the command line

There is a way to suppress the path translation by setting MSYS_NO_PATHCONV=1 in Windows Git MSys or MSYS2_ARG_CONV_EXCL=”*” in MSYS2. Alternatively, you can set the variable only temporarily just for that command by putting the assignment just before the command itself: MSYS_NO_PATHCONV=1 arm-none-linux-gnueabi-gcc.exe -Wall -g \ -Wl,–dynamic-linker=/usr/lib/myrpath/ld-linux.so.3 \ -Wl,-rpath=/usr/lib/myrpath \ -I../targetsysroot/usr/include \ myprogram.c -o myprogram

I don’t understand -Wl,-rpath -Wl,

The -Wl,xxx option for gcc passes a comma-separated list of tokens as a space-separated list of arguments to the linker. So gcc -Wl,aaa,bbb,ccc eventually becomes a linker call ld aaa bbb ccc In your case, you want to say “ld -rpath .“, so you pass this to gcc as -Wl,-rpath,. Alternatively, you can specify repeat … Read more