Sun Studio 12: C++ User's Guide

A.2.83 –Rpathname[:pathname…]

Builds dynamic library search paths into the executable file.

This option is passed to ld.

A.2.83.1 Defaults

If the -R option is not present, the library search path that is recorded in the output object and passed to the runtime linker depends upon the target architecture instruction specified by the -xarch option (when -xarch is not present, -xarch=generic is assumed).

Value 

Default Library Search Path  

v9, v9a, or v9b

install-directory/SUNWspro/lib/v9

All other values 

install-directory/SUNWspro/lib

In a default installation, install-directory is /opt.

Interactions

This option accumulates instead of overrides.

If the LD_RUN_PATH environment variable is defined and the –R option is specified, then the path from –R is scanned and the path from LD_RUN_PATH is ignored.

See also

–norunpath, Linker and Libraries Guide