In the Quick Guide of Freescale sabre lite linux system, you can find how to install the sdk, and how to build the cross compile tool chain. It should be that the lib of armv7l-timesys-linux-gnueabi-gcc is used to cross compile the program. 

Also in this document, you can see how to burn a new linux image, and so on.

For the serial.c code, it is an example showing how to set up serial communication configuration. Also, for more information, you can go into this http://en.wikibooks.org/wiki/Serial_Programming/Serial_Linux