To be frank, the Arduino ide was a fork of Processing's and the compiler suite was GCC. They 'simply' glued the pre-existing pieces together. I'm not saying that it's trivial to do that but it's also not exactly a herculean task. Even the bootloader was a fork of Hernando Barragán's pre-existing Wiring project.