Bumping an 'old' thread here, sorry
.
This has come up a few times in the past, mostly between twobob, knc1 & me, so some of it should come up in a search
.
That said, one of the easiest way is simply to use Mentor Graphic's
Sourcery CodeBench Lite ToolChain, with the proper CFLAGS (more on that later).
For the more adventurous, I personally use a bleeding-edge Linaro TC built with crosstool-ng. The config & build scripts (which I encourage anyone building a Kindle X-TC to read, at least the env setup part) should answer most of the questions one might have about the preferred FLAGS, and the various TC Amazon used on specific devices. Like I said, bleeding-edge, so it implies some hand-holding sometimes, especially for stuff targeting older devices (K2/DX/K3), read the script
.
Said script is available in the
gigantic hack thread, in the tarball named kindle-x-tc-YYYY.MM.N.tar.gz, where YYYY.MM is the Linaro release used.