Problem
I had the problem that programs compiled with icc and ifort needed a library from the compiler’s directory to run, and I had gotten tired of needing to set LD_LOAD_PATH
Solution
Adding -Wl,-R/path/to/lib to the linker line solved the problem.
With an autotools based distribution, it was a matter of going:
/configure LDFLAGS=-Wl,-R/opt/intel/cce/10.1.015/bin CC=/opt/intel/cce/10.1.015/bin/icc CXX=/opt/intel/cce/10.1.015/bin/icpc F77=/opt/intel/fce/10.1.015/bin/ifort FC=/opt/intel/fce/10.1.015/bin/ifort --prefix= ...