View Single Post
Old 08-12-2012, 11:13 PM   #10
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@GM: The easiest way is to simply use more or less the same TC as Amazon used on the K2/K3 (GCC 4.1/glibc 2.5/K 2.6.22 IIRC), and try to avoid ABI/API mismatches in bundled 3rd-party libs. If this is unavoidable, statically link *only* the 3rd-party libs. (Same thing if the 3rd-party lib is not bundled with the Kindle, or just ship the shared libs with your app, and tweak LD_LIBRARY_PATH at runtime).

If you're adventurous like me, you *can* use a newer GCC/glibc pair (I'm using Linaro GCC 4.7/glibc 2.9 for my k2/k3 tc), but know that you might have to tweak some C stuff/trick autotools to avoid pulling stuff from newer glibc, and that C++ stuff will probably be a no-go unless you're willing/can statically link libstdc++. (And you'll have to kill gcc's ssp and glibc's fortify support, which is usually a simple matter of correct CPP/CXX/CFLAGS).

If you're targeting the K4/K5, it's way, way neater, since the TC Amazon used is not so freaking ancient (don't remember exactly, but I'd say GCC 4.4/eglibc 2.12/K 2.6.31).

That's what I've been doing so far, without too much trouble .

And remember, readelf is your friend ^^.

Last edited by NiLuJe; 08-12-2012 at 11:59 PM.
NiLuJe is offline   Reply With Quote