The Free Pascal compiler supports smartlinking and the creation of libraries. However, the default behaviour is to compile each unit into one big object file, which will be linked as a whole into your program. Shared libraries can be created on most platforms, although current level of FPC support may vary (they are e.g. not supported for GO32v2 and OS2 targets).
It is also possible to take existing units and put them together in 1 static or shared library (using the ppumove tool, section 8.7, page 436).