Add sanity checks for GCC, fix compile errors, enter linker Hell.