Hello Eugene,
What do you trying to build (application, drivers)? Are you using Freescale dev board and which flavour of kernel and distribution you are using?
Second, you need a cross-compiler toolchain with gcc, libraries, headers to build for imx6. You can download it as Freescale suggested or from linaro website. They have references for Cortex-A9 which is imx6
export path to your toolchain binaries, for example: export PATH=$PATH:/usr/local/toolchain/arm-linux-gnueabi/bin
In any case, describe in more details what are you planning to build.
Regards,
Konstantyn Prokopenko.