A: 

Thanks everyone, I found the answer.

Basically, you can simply link to libgcc.a / libgcc.lib which was used when building the library.

The more convenient way that deals with the ___chkstk problem only means doing something like ar x libgcc.a (which produces many .o files) and then merging your libbz2 object files with __chkstk.o file.

HardCoder1986
+1  A: 

I read your answer, but I think there's an easier (automatic) way of doing the manual merging of object files: use the CFLAG -static-libgcc, which will link in the necessary functions (what you are describing and doing manually).

rubenvb
Nice, thank you.
HardCoder1986