I apologize if answer for this questions seems obvious to some peoples, I'm quite new to this.
I can't figure out what is the name of a target for barebone arm cortex-m3 cpu - I have tried some combinations but calling a dummy function from library created by that toolchain caused immediate hard fault.

Hey, sorry for late response.
arm-none-eabi worked apparently I was missing -mthumb switch. So thanks for that.

Can You give me some hints how to build an autotools library project, for example libpng?
Should I use portage in conjunction with crossdev toolchain for this or just setup relevant environment variables?
My target is barebone STM32 m3.