A simple search on this forum as well as google leads to a plethora of documents all discussing how this can be achieved.
As you have not mentioned what compiler, what IDE or anything that can help us help you I will leave it to you to find www.google.com or to find the search feature of this forum.
What have you tried so far? Which OS are you using?
Have you checked this guide before, http://shawnhymel.com/809/cross-compiling-on-linux-for-the-edison/ http://shawnhymel.com/809/cross-compiling-on-linux-for-the-edison/? It contains the instructions to set it up in case you haven't seen the BSP or are unsure on how to proceed.
Here you can find the latest changes and instructions on how to install the kernel and troubleshooting if necessary, https://github.com/01org/edison-linux https://github.com/01org/edison-linux. Please read the README file thoroughly before starting, you'll have a better perspective if you do this first.
Also check the Native Application Guide if you still need some guidance on building the toolchain, http://download.intel.com/support/edison/sb/edison_nag_331192003.pdf.