Use the "-shared" option to link shared libraries. The compiler does not support "-Wl," or "-rpath" but does know how to pass "-soname" through to the linker.