Вопрос решен. Документацию на линкер читать повнимательней нужно было :)
-l namespec
--library=namespec
Add the archive or object file specified by namespec to the list of files to link.
This option may be used any number of times. If namespec is of the form
‘:filename’, ld will search the library path for a file called filename, otherwise
it will search the library path for a file called ‘libnamespec.a’.