Buildsystem: Auto-discover the location of libgcc

As written, the buildsystem depened on libgcc being in a specific
location and gcc version. This change uses the cross compiler to
determine the correct location and version of libgcc to use.
Merge branch 'master' into interrupts

I was getting tired of having to specify the location of libgcc manually.