Sun WorkShop Compiler C 5.0 User's Guide

-xnolib

Does not link any libraries by default; that is, no -l options are passed to ld. Normally, the cc driver passes -lc to ld.

When you use -xnolib, you have to pass all the -l options yourself. For example:

% cc test.c -xnolib -Bstatic -lm -Bdynamic -lc

links libm statically and the other libraries dynamically.