2011/2/7 Luca Dionisi <[email protected]>: > > I am trying, without success at the moment, to cross compile stackless > (version 2.6.2) from a x86 host (linux) to a mips architecture. > [...] > > I am using a OpenWRT buildroot as cross-compiler tools. > What I get is a MIPS executable (and libs) that runs on my router (a > Omnima ADM5120) but when I execute stackless.run() with some tasklet > then it immediately does a segmentation fault. > What could possibly have gone wrong?
As somewhere already mentioned, it is most probably wrong or missing ARM code which caused the segfault. I've ported some packages to ARM, maybe one of these hints will help you: 0. Before making assumptions about what macros should have been enabled on your architecture, better have them displayed: # echo | gcc -E -dD - 1. Try compiling without -Os or -O2 and the such. 2. Find where any arch-dependent code is used. 4. Append one or modify any present #define. If you don't know asm, try using a GCC built-ins [1], or better yet, use libatomic_ops [2]. (I wish every project would use the latter as fallback for any not already covered arch.) 5. If you still get segfaults, try saving less (or more) registers - refer to your arch's handbook. Here's an example of mine [4]. The code should remind you of Stackless ;-) -- Mark http://mark.ossdl.de/ [1] http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html [2] http://www.hpl.hp.com/research/linux/atomic_ops/ [3] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0235c/index.html [4] https://github.com/wmark/ossdl-overlay/blob/master/dev-python/greenlet/files/greenlet-0.2-arm32.patch _______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
