Archive for October 2014

When going gets tough, you call GCC.

Hi :D

In this entry I will talk about the podcast Internals of GCC by Software Engineering Radio with Morgan Deters as guest. 

At the beginning of the podcast we can hear when they talk about the relevance of creating new compilers. In my opinion, this is important because we can have a better compiler than the actual ones and also we can take this as a challenge to build our own compiler, taking on count the new technologies and even new architectures (but I believe I’ve talked about this in other entries).

Then, the podcast talks about the GNU Compiler Collection. This is one of the most important “frameworks” in order to compile a lot of different languages. Also, the GCC is really flexible and portable, as we can use it in several operating systems and architectures and we can even generate the files it uses in the compilation process (like the object file) and it allows us to link some external libraries with just one more option.

Talking about how GCC works, I was pretty surprised when the mentioned that it had 3 parts: a front-end, a middle-end and a back-end. I think this is pretty useful, because, as we learned on several courses, the modularity is a great advantage when you can replace a component by another in a transparent fashion. Also, this kind of reminds me the adapter pattern we learned on our Software Design and Architecture course, where we had two different technologies and we applied this patter in order to ensure the communication between both technologies (I think this might apply for the middle-end). It’s important to remember that GCC can be more than a C compiler (a lot of use just use the C Compiler). GCC can receive a file expressed in several languages (using its front-end) and run it in some specific architecture (done by the back-end) and the user should not notice any difference if he/she is using different architectures.

I hope you enjoyed this entry :D


- Copyright © Compilers - Hatsune Miku - Powered by Blogger - Designed by Johanes Djogan -