add libm, <math.h>, <cmath>, <endian.h>
silence a warning in <endian.h>

libm has a few more, but i won't bother with those
don't remake everyting if a subdir extraflags.mk changes
add missing parts of typeinfo code that somehow got lost
don't hardcode libgcc path